Voicing measure for a speech CODEC system

ABSTRACT

A system and method is provided that employs a frequency domain interpolative CODEC system for low bit rate coding of speech which comprises a linear prediction (LP) front end adapted to process an input signal providing LP parameters which are quantized and encoded over predetermined intervals and used to compute a LP residual signal. An open loop pitch estimator adapted to process the LP residual signal, a pitch quantizer, and a pitch interpolator also provides a pitch contour within the predetermined intervals. A voice activity detector adapted to process the LP parameters and the open loop pitch contour over the predetermined intervals is also provided as well as a signal processor responsive to the LP residual signal and the pitch contour and adapted to perform the following functions: extract a prototype waveform (PW) from the LP residual and the open loop pitch contour for a number of equal sub-intervals within the predetermined invervals; normalize the PW by a gain value of the PW; encode a magnitude of the PW; and provide a voicing measure where the voicing measure characterizes a degree of vocing of the input speech signal and is derived from several input parameters that are correlated to degrees of periodicity of the signal over the predetermined intervals. The voicing measure is provided for the purpose of regenerating a PW phase at a decoder; and providing improved quantization of the PW magnitude at an encoder. The voicing measure is encoded jointly with a PW nonstationarity measure vector using a spectrally weighted vector quantizer having a codebook partioned based on a voiced and unvoiced mode.

CROSS REFERENCE TO RELATED APPLICATIONS

This application claims benefit under 35 U.S.C. § 119(e) from U.S. Provisional Patent Application Ser. No. 60/268,327 filed on Feb. 13, 2001, and from U.S. Provisional Patent Application Ser. No. 60/314,288 filed on Aug. 23, 2001, the entire contents of both of said provisional applications being incorporated herein by reference.

BACKGROUND OF THE INVENTION

1. Field of the Invention

The present invention relates to a method and system for coding low bit rate speech for a communications system. More particularly the present invention relates to a method and apparatus for using a voicing measure to perform improved quantization at an encoder and additionally to enable the regeneration of a speech signal at the correct degree of periodicity at a decoder.

2. Background of the Invention

Currently, various speech encoding techniques are used to process speech. These techniques do not adquately address the need for a speech encoding technique that improves the modeling and quantization of a speech signal, specifically, the spectral characteristics of a speech prediction residual signal which includes a prototype waveform (PW) gain vector, a PW magnitude vector, and a PW phase information.

In particular, prior art techniques are representative but not limited to the following see, e.g., L. R. Rabiner and R. W. Schafer, “Digital Processing of Speech Signals” Prentice-Hall 1978 (hereinafter known as reference 1), W. B. Klejin and J. Haagen, “Waveform Interpolation for Coding and Synthesis”, in Speech Coding and Synthesis, Edited by W. B. Klejin, K. K. Paliwal, Elsevier, 1995 (heeinafter known as reference 2); F. Iatakura, “Line Spectral Representation of Linear Predictive Coefficients of Speech Signals”, Journal of Acoustical Society of America, vol 4. 57, no. 1, 1975 (hereinafter known as reference 3); P. Kabal and R. P. Ramachandran, “The Computation of Line Spectral Frequencies Using Chebyshev Polybimials”, IEEE Trans. On ASSP, vol. 34, no. 6, pp. 1419–1426, December 1986 (hereinafter known as reference 4); W. B. Klejin, “Encoding Speech Using Prototype Waveforms” IEEE Transactions on Speech and Audio Processing, Vol. 1, No. 4, 386–399, 1993 (hereinafter known as reference 5); and W. B. Kleijn, Y. Shoman, D. Sen and R. Hagen, “A Low Complexity Waveform Interpolation Coder”, IEEE International Conference on Acoustics, Speech and Signal Processing, 1996 (hereinafter known as reference 6). All of the references 1 through 6 are herein incorporated in their entirety by reference.

The prototype waveforms are a sequence of complex Fourier transforms evaluated at pitch harmonic frequencies, for pitch period wide segments of the residual, at a series of points along the time axis. Thus, the PW sequence contains information about the spectral characteristics of the residual signal as well as the temporal evolution of these characteristics. A high quality of speech can be achieved at low coding rates by efficiently quantizing the important aspects of the PW sequence.

In PW based coders, the PW is separated into a shape component and a level component by computing the RMS (or gain) value of the PW and normalizing the PW to a unity RMS value. As the pitch frequency varies, the dimensions of the PW vectors also vary, typically in the range of 11–61. The quantization of the PW magnitude vector can be performed more accurately by utilizing the knowledge about the degree of the periodicity of the speech signal.

In prior art, the SEW and REW quantized magnitude components and SEW and REW estimated phase components are used in regenerating the speech signal. The use of estimated phase components result in speech that is rough and not very accurate due to the approximations used. References 1–6 do not adquately present a solution to this problem.

Thus, a need exists for a system and method that provides a means to characterize and encode the degree of periodicity of the input speech signal and at the decoder, use this information to regenerate the speech signal with the correct degree of periodicity.

SUMMARY OF THE INVENTION

An object of the present invention is to provide a system and method for improving the regeneration of a voice signal at a decoder while using a voicing measure to improve the processing at an encoder. A parameter is used at a decoder to reproduce the correct degree of periodicity in the reconstructed signal.

These and other objects are substantially achieved by a system and method employing a frequency domain interpolative CODEC system for low bit rate coding of speech. The CODEC system comprises a linear prediction (LP) front end adapted to process an input signal providing LP parameters which are quantized and encoded over predetermined intervals and used to computer a LP residual signal. An open loop pitch estimator adapted to process the LP residual signal, a pitch quantizer, and a pitch interpolator also provides a pitch contour within the predetermined intervals. A voice acitivity detector adapted to process the LP parameters and the open loop pitch contour over the predetermined intervals is also provided as well as a signal processor responsive to the LP residual signal and the pitch contour and adapted to perform the following functions: extract a prototype waveform (PW) from the LP residual and the open loop pitch contour for a number of equal sub-intervals within the predetermined intervals; normalize the PW by a gain value of the PW; encode a magnitude of the PW; and provide a voicing measure where the voicing measure characterizes a degree of voicing of the input speech signal and is derived from several input parameters that are correlated to degrees of periodicity of the signal over the predetermined intervals. The voicing measure is provided for the purpose of regenerating a PW phase at a decoder; and providing improved quantization of the PW magnitude at an encoder. The voicing measure is encoded jointly with a PW nonstationarity measure vector using a spectrally weighted vector quantizer having a codebook partitioned based on a voiced and unvoiced mode.

BRIEF DESCRIPTION OF THE DRAWINGS

The various objects, advantages and novel features of the present invention will be more readily understood from the following detailed description when read in conjunction with the appended drawings, in which:

FIGS. 1A and 1B are block diagrams of a Frequency Domain Interpolative (FDI) coder/decoder (CODEC) for performing coding and decoding of an input voice signal in accordance with an embodiment of the present invention;

FIG. 2 is a block diagram of frame structures for use with the CODEC of FIG. 1 in accordance with an embodiment of the present invention;

FIG. 3 is a flow chart for a method for updating scale factors to limit spectral amplitude gain in performing noise reduction in accordance with an embodiment of the present invention;

FIG. 4 is a flow chart for a method for performing tone detection in accordance with an embodiment of the present invention;

FIG. 5 is a block diagram of stationary and nonstationary components of a prototype waveform (PW) in accordance with an embodiment of the present invention;

FIG. 6 is a flow chart for a method for enforcing monotonic measures in accordance with an embodiment of the present invention;

FIG. 7 is a flow chart for a method for computing gain averages in accordance with an embodiment of the present invention;

FIG. 8 is a flow chart for a method for computing the attenutation of a PW mean high in the unvoiced high frequency band in accordance with an embodiment of the present invention; and

FIG. 9 is a flow chart for a method for computing the attenuation of a PW mean high in the voice high frequency band in accordance with an embodiment of the present invention.

Throughout the drawing figures, like reference numerals will be understood to refer to like parts and components.

DETAILED DESCRIPTION OF PREFERRED EMBODIMENTS

FIGS. 1A and 1B are block diagrams of a Frequency Domain Interpolative (FDI) coder/decoder (CODEC) 100 for performing coding and decoding of an input voice signal in accordance with an embodiment of the present invention. The FDI CODEC 100 comprises a coder portion 100A which computes prototype waveforms (PW) and a decoder portion 100B which reconstructs the PW and speech signal.

Specifically, the coder portion 100A illustrates the computation of PW from an input speech signal. Voice activity detection (VAD) 102 is performed on the input speech to determine whether the input speech is actually speech or noise. The VAD 102 provides a VAD flag which indicates whether the input signal was noise or speech. The detected signal is then provided to a noise reduction module 104 where the noise level for the signal is reduced and provided to a linear predictive (LPC) analysis filter module 106.

The LPC module 106 provides filtered and residual signals to the protoypte extraction module 108 as well as LPC parameters to decoder 100B. The pitch estimation and interpolation module 110 receives the LPC filtered and residual signals from the LPC analysis filter module 106 and pitch contours from the prototype extraction module 108 and provides a pitch and a pitch gain.

The extracted prototype waveform from prototype extraction module 108 is provided to compute prototype gain module 112, PW magnitude and computation and normalization module 114, compute subband nonstationarity measure module 116 and compute voicing measure module 118. Compute voicing measure (VM) module 118 also receives the pitch gain from pitch estimation and interpolation module 110 and computes a voicing measure.

The compute prototype gain module 112 computes a prototype gain and provides the PW gain value to decoder portion 100B. PW magnitude computation and normalization module 114 computes the PW magnitude and normalizes the PW magnitude.

Compute subband nonstationarity measure module 116 computes a subband nonstationarity measure from the extracted prototype waveform. The computed subband nonstationarity measure and computed voicing measure are provided to a subband nonstationarity measure—Vector quantizer (VQ) module 122 which processes the received signals.

A PW magnitude quantization module 120 receives the computed PW magnitude and normalized signal along with the VAD flag indication and quantizes the received signal and provides a PW magnitude value to the decoder 100B.

The decoder 100B further includes a periodic phase model module 124 and aperiodic phase model module 126 which receive the PW magnitude value and subband nonstationarity measure-voicing measure value from coder 100A and compute a periodic phase and an aperiodic phase respectively, from the received signal. The periodic phase model module 124 provides a complex periodic vector having a periodic component level and the aperiodic phase model module 126 provides a complex aperiodic vector having an apriodic component level to a summer which provides a complex PW vector to a normalize PW gain module 128. The normalize PW gain module also receives the PW gain value from coder 100A.

A pitch interpolation module 130 performs pitch interpolation on a pitch period provided by encoder 100A. The normalize PW gain signal and interpolated pitch frequency contour signal is provided to an interpolative sythesis module 132 which performs interpolative synthesis to obtain a reconstructed residual signal from the previously mentioned signals.

The reconstructed residual signal is provided to an all pole LPC synthesis filter module 134 which processes the reconstructed residual signal and provides the filtered siganl to an adaptive postfilter and tilt correction module 136. Modules 134 and 136 also receive the VAD flag indication signal and interpolated LPC parameters from the encoder 100A. A reconstructed speech signal is provided by the adaptive postfilter and tilt correction module 136.

Specifically, the FDI codec 100 is based on techniques of linear predictive (LP) analysis, robust pitch estimation and frequency domain encoding of the LP residual signal. The FDI codec operates on a frame size of preferably 20 ms. Every 20 ms, the speech encoder 100A produces 80 bits representing compressed speech. The speech decoder 100B receives the 80 compressed speech bits and reconstructs a 20 ms frame of speech siganl. The encoder 100A preferably uses a look ahead buffer of at least 20 ms, resulting in an algorithmic delay comprising buffering delay and look ahead delay of 40 ms.

The speech encoder 100A is equipped with a built-in voice acitivity detector (VAD) 102 and can operate in continuous transmission (CTX) mode or in discontinuous transmission (DTX) mode. In the DTX mode, comfort noise information (CNI) is encoded as part of the compressed bit stream during silence intervals. At the decoder 100B, the CNI packets are used by a comfort noise generation (CNG) algorithm to regenerate a close approximation of the ambient noise. The VAD information is also used by an integrated front end noise reduction scheme that can provide varying degrees of background noise level attenuation and speech signal enhancement.

A single parity check bit is preferably included in the 80 compressed speech bits of each frame of the input speech signal to detect channel errors in perceptually important compressed speech bits. This enables the codec 100 to operate satisfactorily in links with a random bit error rate up to about 10⁻³. In addition, the decoder 100B uses bad frame concealment and recover techniques to extend signal processing operations during frame erasures.

Additionally, in addition to the speech coding functions, the codec 100 also has the ability to transparently pass dual tone multifrequency (DTMF) and signaling tones.

As discussed above, the FDI codec 100 uses the linear predictive analysis technique to model the short term Fourier spectral envelope of the input speech signal. Subsequently, a pitch frequency estimate is used to perform a frequency domain prototype waveform analysis of the LP residual signal. Specifically, the PW analysis provides a characterization of the harmonic or fine structure of the speech spectrum. More specifically, the PW magnitude spectrum provides the correction necessary to refine the short term LP spectral estimate to obtain a more accurate fit to the speech spectrum at the pitch harmonic frequencies. Information about the phase of the signal is implicitly represented by the degree of periodicity of the signal measured across a set of subbands.

In a preferred embodiment of the present invention, the input speech signal is processed in consecutive non-overlapping frames of 20 ms duration, which corresponds to 160 samples at the sampling frequency of 8000 samples/sec. The encoder 100A parameters are quantized and transmitted once for each 20 ms frame. A look-ahead of 20 ms is used for voice activity detection, noise reduction, LP analysis and pitch estimation. This produces in an algorithmic delay which is defined as a buffering delay and a look-ahead delay of 40 ms.

Referring to FIG. 2 which illustrates the samples used for various functions at the encoder 100A, an estimated size of buffered samples for various frames is shown. For example, a VAD window 210 uses buffered samples from about 160 to 400 samples. A noise reduction window 220 uses about the same number of samples. Pitch estimation windows 230 ₁ up to 230 ₅ each uses about 240 samples. The LP analysis window processes the signal in about 80 to 400 samples. A current frame being encoded is processed between 80 to 240 samples. A new input speech data 260 and look-ahead 280 are processed from about 240 to 400 samples while a past data is processed from zero to 80 samples. for the purposes of excitation modeling, each frame is further divided into 8 subframes preferably of duration 2.5 ms or 20 samples.

The invention will now be discussed in terms of front end processing, specifically input preprocessing. The new input speech samples are first scaled down by preferably 0.5 to prevent overflow in fixed point implementation of the coder 100A. In another embodiment of the present invention, the scaled speech samples can be high-pass filtered using an infinite impulse response (IIR) filter with a cut-off frequency of 60 Hz, to eliminate undesired low frequency components. The transfer function of the 2nd order high pass filter is given by $\begin{matrix} {{H_{hpf1}(z)} = \frac{0.939819335 - {1.879638672\mspace{14mu} z^{- 1}} + {0.939819335\mspace{14mu} z^{- 2}}}{1 - {1.933195469\mspace{14mu} z^{- 1}} + {0.935913085\mspace{14mu} z^{- 2}}}} & (1) \end{matrix}$

In terms of the VAD module 102, the preprocessed signal is analyzed to detect the presence of speech activity. This comprises the following operations: scaling the signal via an automatic gain control (AGC) mechanism to improve VAD performance for low level signals, windowing the Automatic Gain Control (AGC) scaled speech and computing a set of autocorrelation lags, performing a 10^(th) order autocorrelation LP analysis of the AGC scaled speech to determine a set of LP parameters which are used during pitch estimation, performing a preliminary pitch estimation based on the pitch candidates for the look-ahead part of the buffer, performing voice activity detection based on the autocorrelation lags and pitch estimate and the tone detection flag that is generated by examining the distance between adjacent line spectral frequencies (LSFs) which will be described in greater detail below with respect to conversion to line spectral frequencies.

This series of operations produces a VAD_FLAG and a VID_FLAG that have the following values depending on the detected voice activity: ${VAD\_ FLAG} = \left\{ {{\begin{matrix} 1 & {{{if}\mspace{14mu}{voice}\mspace{14mu}{activity}\mspace{14mu}{is}\mspace{14mu}{present}},} \\ 0 & {{if}\mspace{14mu}{voice}\mspace{14mu}{activity}\mspace{14mu}{is}\mspace{14mu}{{absent}.}} \end{matrix}{VID\_ FLAG}} = \left\{ \begin{matrix} 0 & {{{if}\mspace{14mu}{voice}\mspace{14mu}{activity}\mspace{14mu}{is}\mspace{14mu}{present}},} \\ 1 & {{if}\mspace{14mu}{voice}\mspace{14mu}{activity}\mspace{14mu}{is}\mspace{14mu}{{absent}.}} \end{matrix} \right.} \right.$ It should be noted that the VAD_FLAG and the VID_FLAG represent the voice activity status of the look-ahead part of the buffer. A delayed VAD flag, VAD_FLAG_DL1 is also maintained to reflect the voice activity status of the current frame. In a presentation given during an IEEE speech and audio processing workshop in Finland during 1999, the entire contents of the documentation being incorporated by reference herein, the presenters F. Basbug, S. Nandkumar and K. Swamianthan described an AGC front-end for the VAD which itself is a variation of the voice activity detection algorithms used in cellular standards “TDMA cellular/PCS Radio Interface—Minimum Objective Standards for IS-136 B, DTX/CNG Voice Activity Detection”, which is also incorporated by reference in its entirety. A by-product of the AGC front-end is the global signal-to-noise ratio, which is used to control the degree of noise reduction.

The VAD flag is encoded explicitly only for unvoiced frames as indicated by the voicing measure flag. Voiced frames are assumed to be active speech. In the present embodiment of the invention, the VAD flag is not coded explicitly. The decoder sets the VAD flag to a one for all voiced frames. Howevr, it will be appreciated by those skilled in the art that the VAD flag can be coded explicitly without departing from the scope of the present invention.

Noise reduction module 104 provides noise reduction to the voice activity detected speech signal. Specifically, the preprocessed speech signal is processed by a noise reduction algorithm to produce a noise reduced speech signal. The following is a series of steps comprising the noise reduction algorithm: A trapezoidal windowing and the computing of the complex discrete Fourier transform (DFT) of the signal is performed. FIG. 2 depicts the part of the buffer that undergoes the DFT operation. A 256-point DFT (240 windowed samples+16 padded zeros) is used. The magnitude of the DFT is smoothed along the frequency axis across a variable window whose width is about 187.5 Hz in the first 1 KHz, about 250 Hz in the range of 1–2 KHz, and about 500 Hz in the range of 2–4 KHz regions. These values reflect a compromise between the conflicting objectives of preserving the format structure and having sufficient smoothness of the speech signal.

If the VVAD_FLAG, which is the VAD output prior to hangover, is a one which indicates voice activity, then the smoothed magnitude square of the DFT is taken to be the smoothed power spectrum of noisy speech S(k). However, if the VVAD_FLAG is a zero indicating voice inactivity, the smoothed DFT power spectrum is then used to update a recursive estimate of the average noise power spectrum N_(av)(k) as follows: N _(av)(k)=0.9·N _(av)(k)+0.1·S(k) if VAD_FLAG=0  (2) A spectral gain function is then computed based on the average noise power spectrum and the smoothed power spectrum of the noisy speech. The gain function G_(nr)(k) takes the following form: $\begin{matrix} {{G_{nr}(k)} = \frac{S(k)}{{F_{nr}{N_{av}(k)}} + {S(k)}}} & (3) \end{matrix}$ Here, the factor F_(nr) is a factor that depends on the global signal-to-noise-ratio SNR_(global) that is generated by the AGC front-end for the VAD. The factor F_(nr) can be expressed as an empirically derived piecewise linear function of SNR_(global) that is monotonically non-decreasing. The gain function is close to unity when the smoothed power spectrum S(k) is much larger than the average noise power spectrum N_(av)(k). Conversely, the gain function becomes small when S(k) is comparable to or much smaller than N_(av)(k). The factor F_(nr) controls the degree of noise reduction by providing for a higher degree of noise reduction when the global signal-to-noise ratio is high (i.e., risk of spectral distortion is low since VAD and the average noise estimate are fairly accurate). Conversely, the factor restricts the amount of noise reduction when the global signal-to-noise ratio is low. For example, the risk of spectral distortion is high due to increased VAD inaccuracies and less accurate average noise power spectral estimate.

The spectral amplitude gain function is further clamped to a floor which is a monotonically non-increasing function of the global signal-to-noise ratio. This kind of clamping reduces the flunctuations in the residual background noise after noise reduction making the speech sound smoother. The clamping action is expressed as: G′ _(nr)(k)=MAX(G _(nr)(k),T _(global)(SNR _(global))  (4) Thus, at high global signal-to-noise ratios, the spectral gain functions will be clamped to a lower floor since there is less risk of spectral distortion due to inaccuracies in the VAD or the average noise power spectral estimate N_(av)(k). But at lower global signal-to-noise ratio, the risks of spectral distortion outweigh the benefits of reduced noise and therefore a higher floor would be appropriate.

In order to reduce the frame-to-frame variation in the spectral amplitude gain function, a gain limiting device is used which limits the gain between a range that depends on the previous frame's gain for the same frequency. The limiting action can be expressed as follows: G _(nr) ^(new)(k)=MAX({S _(nr) ^(L) ·G _(nr) ^(old)(k)},MIN({S _(nr) ^(H) ·G _(nr) ^(old)(k)},G′ _(nr)(k)))  (5) The scale factors S_(nr) ^(L) and S_(nr) ^(H) are updated using a state machine whose actions depend on whether the frame is active, inactive or transient.

FIG. 3 depicts a flowchart 300 which performs scale factor updates in accordance with an embodiment of the present invention. The process 300 is occrs in noise reduction module 104 and is initiated at step 302 where input values VAD_FLAG and scale factors are received. The method 300 then proceeds to step 304 where a determination is made as to whether the VAD_FLAG is zero which indicates voice activity is absent. If the determination is affirmative the method 300 proceeds to step 306 where the scale factors are adjusted to be closer to unity. The method 300 then proceeds to step 308.

At step 308 a determination is made as to whether the VAD_FLAG was zero for the last two frames. If the determination is affirmative the method proceeds to step 310 where the scale factors are limited to be very close to unity. However, if the determination was negative, the method 300 then proceeds to step 312 where the scale factors are limited to be away from unity.

If the determination at step 304 was negative, the method 300 then proceeds to step 314 where the scale factors are adjusted to be away from unity. The method 300 then proceeds to step 316 where the scale factors are limited to be far away from unity.

The steps 310, 312 and 316 proceed to step 318 where the updated scale factors are outputted.

The final spectral gain function G_(nr) ^(new)(k) is multiplied with the complex DFT of the preprocessed speech, attenuating the noise dominant frequencies and preserving signal dominant frequencies. An overlap-and-add inverse DFT is then performed on the spectral gain scaled DFT to compute a noise reduced speech signal over the interval of the noise reduction window

Since the noise reduction is carried out in the frequency domain, the availability of the complex DFT of the preprocessed speech is taken advantage of in order to carry out DTMF and Signaling tone detection. These detection schemes are based on examination of the strength of the power spectra at the tone frequencies, the out-of-band energy, the signal strength, and validity of the bit duration pattern. It should be noted that the incremental cost of having such detection schemes to facilitate transparent transmission of these signals is negligible since the power spectrum of the preprocessed speech is already available.

An embodiment of the invention will now be described in terms of LPC analysis filtering module 106. The noise reduced speech signal is subjected to a 10^(th) order autocorrelation method of LP analysis where {s_(nr)(n),0≦n<400} denotes the noise reduced speech buffer, where {s_(nr)(n),80≦n<240} is the current frame being encoded and {s_(nr)(n),240≦n<320} is the look-ahead buffer 280 as shown in FIG. 2. In the LP analysis of speech, the magnitude spectrum of short segments of speech is modeled by the magnitude frequency response of an all-pole minimum phase filter, whose transfer function is represented by $\begin{matrix} {{H_{lp}(z)} = \frac{1}{\sum\limits_{m = 0}^{M}{a_{m}z^{- m}}}} & (6) \end{matrix}$ Here, {a_(m),0≦m≦M} are the LP parameters for the current frame and M=10 is the LP order. LP analysis is performed using the autocorrelation method with a modified Hanning window of size 40 ms (320 samples) which includes the 20 ms current frame and the 20 ms lookahead frame as shown in FIG. 2.

The noise reduced speech signal over the LP analysis window {s_(nr)(n),80≦n<400} is windowed using a modified Hanning window function {w_(lp)(n),0≦n<320} defined as follows: $\begin{matrix} {{w_{lp}(n)} = \left\{ \begin{matrix} {{0.5 - {0.5{\cos\left( \frac{2\;\pi\; n}{319} \right)}}},} & {{0 \leq n < 240},} \\ {\frac{\left( {0.5 - {0.5{\cos\left( \frac{2\;\pi\; n}{319} \right)}}} \right)}{\cos^{2}\left( \frac{2\;\pi\;\left( {n - 240} \right)}{320} \right)},} & {240 \leq n < 320.} \end{matrix} \right.} & (7) \end{matrix}$ The windowed speech buffer is computed by multiplying the noise reduced speech buffer with the window function as follows: s _(w)(n)=s _(nr)(80+n)w _(lp)(n) 0≦n<240.  (8) Normalized autocorrelation lags are computed from the windowed speech by $\begin{matrix} {{{r_{lp}(m)} = {{\frac{\sum\limits_{n = 0}^{319 - m}{{s_{w}(n)}{s_{w}\left( {n + m} \right)}}}{\sum\limits_{n = 0}^{319}{s_{w}^{2}(n)}}\mspace{31mu} 0} \leq m \leq 10}},} & (9) \end{matrix}$ The autocorrelation lags are windowed by a binomial window with a bandwidth expansion of 60 Hz. The binomial window is given by the following recursive rule: $\begin{matrix} {{l_{w}(m)} = \left\{ \begin{matrix} 1 & {m = 0} \\ {{l_{w}\left( {m - 1} \right)}\frac{4995 - m}{4994 + m}} & {1 \leq m \leq 10.} \end{matrix} \right.} & (10) \end{matrix}$ Lag windowing is performed by multiplying the autocorrelation lags by the binomial window: r _(lpw)(m)=r _(lp)(m)l _(w)(m) 1≦m≦10.  (11) The zeroth windowed lag r_(lpw)(0) is obtained by multiplying by a white noise correction factor of about 1.0001, which is equivalent to adding a noise floor at −40 dB: r _(lpw)(0)=1.0001r _(lp)(0).  (12)

Lag windowing and white noise correction are techniques are used to address problems that arise in the case of periodic or nearly periodic signals. For such signals, the all-pole LP filter is marginally stable, with its poles very close to the unit circle. It is necessary to prevent such a condition to ensure that the LP quantization and signal synthesis at the decoder 100B can be performed satisfactorily.

The LP parameters that define a minimum phase spectral model to the short term spectrum of the current frame are determined by applying Levinson-Durbin recursions to the windowed autocorrelation lags {r_(lpw)(m),0≦m≦10}. The resulting 10^(th) order LP parameters for the current frame are {a′_(m),0≦m≦10}, with a′₀=1. Since the LP analysis window is centered around the sample index of about 240 in the buffer, the LP parameters represent the spectral characteristics of the signal in the vicinity of this point.

During highly periodic signals, the spectral fit provided by the LP model tends to be excessively peaky in the low formant regions, resulting in audible distortions. To overcome this problem, a bandwidth broadening scheme has been employed in this embodiment of the present invention, where the formant bandwidth of the model is broadened adaptively, depending on the degree of peakiness of the spectral model. The LP spectrum is given by $\begin{matrix} {{S\left( {\mathbb{e}}^{j\; w} \right)} = {{\frac{1}{\sum\limits_{m = 0}^{M}{a_{m}^{\prime}{\mathbb{e}}^{{- j}\;{wm}}}}\mspace{31mu} - \pi} \leq w \leq {\pi.}}} & (13) \end{matrix}$ where ω_(m) denotes the pitch frequency estimate of the m^(th) subframe (1≦m≦8) of the current frame in radians/sample. Given this pitch frequency, the index of the highest frequency pitch harmonic that falls within the frequency band of the signal (0–4000 Hz or 0−π radians) for the m^(th) subframe is given by $\begin{matrix} {{K_{m} = {{\left\lfloor \frac{\pi}{\omega_{m}} \right\rfloor\mspace{31mu} 1} \leq m \leq 8}},} & (14) \end{matrix}$ where, └x┘ denotes the largest integer less than or equal to x. The magnitude of the LPC spectrum is evaluated at the pitch harmonics by $\begin{matrix} {{{S(k)}} = {{{S\left( {\mathbb{e}}^{{j\omega}_{8}k} \right)}} = {{\frac{1}{{\sum\limits_{m = 0}^{M}{a_{m}^{\prime}{\mathbb{e}}^{{- j}\;\omega_{8}{km}}}}}\mspace{31mu} 0} \leq k \leq {K_{8}.}}}} & (15) \end{matrix}$ It should be noted that ω₈ corresponds to the 8^(th) subframe has been used here since the LP parameters have been evaluated for a window centered around a sample of about 240 as shown in FIG. 2. A logarithmic peak-to-average ratio of the harmonic spectral magnitudes is computed as $\begin{matrix} {{PAR} = {10\log_{10}{\left\{ \frac{\underset{1 \leq k \leq K_{8}}{MAX}{{S(k)}}}{\frac{1}{\left( {K_{8} - 1} \right)}\left\{ {{\sum\limits_{k = 1}^{K_{8}}{{S(k)}}} - {\underset{1 \leq k \leq K_{8}}{MAX}{{S(k)}}}} \right\}} \right\}.}}} & (16) \end{matrix}$ The peak-to-average ratio ranges from 0 dB (for flat spectra) to values exceeding 20 dB (for highly peaky spectra). The expansion in formant bandwidth (expressed in Hz) is then determined based on the log peak-to-average ratio according to a piecewise linear characteristic: $\begin{matrix} {{dw}_{lp}\left\{ \begin{matrix} {{10 + {2{PAR}}},} & {{{PAR} \leq 5},} \\ {{20 + {12\left( {{PAR} - 5} \right)}},} & {{{PAR} \leq 10},} \\ {{80 + {4\left( {{PAR} - 10} \right)}},} & {{{PAR} \leq 20},} \\ 120 & {{PAR} > 20.} \end{matrix} \right.} & (17) \end{matrix}$ The expansion in bandwidth ranges from a minimum of about 10 Hz for flat spectra to a maximum of about 120 Hz for highly peaky spectra. Thus, the bandwidth expansion is adapted to the degree of peakiness of the spectra. The above piecewise linear characteristic have been experimentally optimized to provide the right degree of bandwidth expansion for a range of spectral characteristics. A bandwidth expansion factor α_(bw) to apply this bandwidth expansion to the LP spectrum is obtained by $\begin{matrix} {\alpha_{bw} = {{\mathbb{e}}^{- \frac{\pi\;{dw}_{lp}}{8000}}.}} & (18) \end{matrix}$ The LP parameters representing the bandwidth expanded LP spectrum are determined by a _(m) =a′ _(m)α_(bw) ^(m) 0≦m≦10.  (19)

The bandwidth expanded LP filter coefficients are converted to line spectral frequencies (LSFs) for quantization and interpolation purposes which is described in “Line Spectral Representation of Linear Predictive Coefficients of Speech Signals” Journal of Acoustical Society of America, vol. 57, no. 1, 1975 by F. Itakura which is incorporated by reference in its entirety. An efficient approach to computing LSFs from LP parameters using Chebychev polynomials is described in “The Computation of Line Spectral Frequencies Using Chebyshev Polynomials,” IEEE Trans. On ASSP, vol. 34, no 6, pages 1419–1426, December 1986 by P. Kabal and R. P. Ramachandran which is herein incorporated by reference in its entirety. The resulting LSFs for the current frame are denoted by {λ(m), 0≦m≦10}.

The LSF domain also lends itself to detection of highly periodic or resonant inputs. For such signals, the LSFs located near the signal frequency have very small separations. If the minimum difference between adjacent LSF values falls below a threshold for a number of consecutive frames, it is highly probable that the input signal is a tone.

FIG. 4 describes a method 400 for tone detection in accordance with an embodiment of the present invention. The method 400 occurs in LPC analysis filtering module 106 and is initiated at step 402 where a tone counter is set illustratively for a maximum of 16. The method 400 then proceeds to step 404 where a determination is made as to whether the LSF value falls below a minimum threshold of for example 0.008. If the determination is answered negatively, the method 400 then proceeds to step 406 where the tone counter detects that the LSF value is above the threshold.

If the method 404 is answered affirmatively, the tone counter detects that the LSF value is below the threshold and increments the counter by one. The methods 406 and 412 proceed to step 408.

At step 408 a determination is made as to whether the tone counter is at its maximum value. If the method 408 is answered negatively, the method 400 proceeds to step 410 where a tone flag equals false indication is provided. If the method 408 is answered negatively, the method 400 then proceeds to step 414 where a tone flag equals true indication is provided.

The steps 410 and 414 proceed to step 416 where the method 400 continues checking for tones. Specifically, method 400 provides a tone flag indication which is a one if a tone has been detected and a zero otherwise. This flag is also used in voice activity detection.

The invention will now be described in reference to the pitch estimation and interpolation module 110. Pitch estimation is performed based on an autocorrelation analysis of a spectrally flattened low pass filtered speech signal. Spectral flattening is accomplished by filtering the AGC scaled speech signal using a pole-zero filter, constructed using the LP parameters of AGC scaled speech signal. If {a_(m) ^(agc),0≦m≦10} are the LP parameters of AGC scaled speech signal, the pole-zero filter is given by $\begin{matrix} {{H_{sf}(z)} = {\frac{\sum\limits_{m = 0}^{M}{a_{m}^{agc}z^{- m}}}{\sum\limits_{m = 0}^{M}{{a_{m}^{agc}(0.8)}^{m}z^{- m}}}.}} & (20) \end{matrix}$ The spectrally flattened signal is low-pass filtered by a 2^(nd) order IIR filter with a 3 dB cutoff frequency of 1000 Hz. The transfer function of this filter is $\begin{matrix} {{H_{lpf1}(z)} = {\frac{0.06745527 - {0.134910548\mspace{14mu} z^{- 1}} + {0.06745527\mspace{14mu} z^{- 2}}}{1 - {1.14298050\mspace{14mu} z^{- 1}} + {0.41280159\mspace{14mu} z^{- 2}}}.}} & (21) \end{matrix}$

The resulting signal is subjected to an autocorrelation analysis in two stages. In the first stage, a set of four raw normalized autocorrelation functions (ACF) are computed over the current frame. The windows for the raw ACFs are staggered by 40 samples as shown in FIG. 2. The raw ACF for the i^(th) window is computed by $\begin{matrix} {{{r_{raw}\left( {i,l} \right)} = \frac{\sum\limits_{n = {40{({i - 1})}}}^{{40{({i - 1})}} + 239 - l}\;{{s_{sf}(n)}{s_{sf}\left( {n + l} \right)}}}{\sum\limits_{n = {40{({i - 1})}}}^{{40{({i - 1})}} + 239}{s_{sf}^{2}(n)}}}{{15 \leq l \leq 125},\mspace{11mu}{2 \leq i \leq 5.}}} & (22) \end{matrix}$

In each frame, raw ACFs corresponding to windows 2, 3, 4 and 5 as shown in FIG. 2 are computed. In addition, a raw ACF for window 1 is preserved from the previous frame. For each raw ACF, the loation of the peak within the lag range 20≦l≦120 is determined.

In the second stage, each raw ACF is reinforced by the preceding and the succeeding raw ACF, resulting in a composite ACF. For each lag l in the raw ACF in the range 20≦l≦120, peak values within a small range of lags [(l−w_(c)(l)),(l+w_(c)(l))] are determined in the preceding and the succeeding raw ACFs. These peak values reinforce the raw ACF at each lag l, via a weighted combination: $\begin{matrix} {{{r_{comp}\left( {i,l} \right)} = {{\frac{{w_{c}(l)} + 1 - {0.1{m_{peak}(l)}}}{\left( {{w_{c}(l)} + 1} \right)}\left\lbrack {\underset{{l - {w_{c}{(l)}}} \leq m \leq {l + {w_{c}{(l)}}}}{MAX}{r_{raw}\left( {{i - 1},m} \right)}} \right\rbrack} + {r_{raw}\left( {i,l} \right)} + {\frac{{w_{c}(l)} + 1 - {0.1{n_{peak}(l)}}}{\left( {{w_{c}(l)} + 1} \right)}\left\lbrack {\underset{{l - {w_{c}{(l)}}} \leq n \leq {l + {w_{c}{(l)}}}}{MAX}{r_{raw}\left( {{i - 1},n} \right)}} \right\rbrack}}}\;{{20 \leq l \leq 120},{2 \leq i \leq 5.}}} & (23) \end{matrix}$ Here, w_(c)(l) determines the window length based on the lag index l: $\begin{matrix} {{w_{c}(l)} = \left\{ \begin{matrix} 2 & {l < 30} \\ \left\lfloor {{0.05l} + 0.5} \right\rfloor & {30 \leq l \leq 70.} \\ 4 & {l > 70} \end{matrix} \right.} & (24) \end{matrix}$

Also, m_(peak)(l) and n_(peak)(l) are the locations of the peaks within the window. The weighting attached to the peak values from the adjacent ACFs ensures that the reinforcement diminishes with increasing difference between the peak location and the lag l. The reinforcement boosts a peak value if peaks also occur at nearby lags in the adjacent raw ACFs. This increases the probability that such a peak location is selected as the pitch period. ACF peaks locations due to an underlying periodicity do not change significantly across a frame. Consequently, such peaks are strengthened by the above process. On the other hand, spurious peaks are unlikely to have such a property and consequently are diminished. This improves the accuracy of pitch estimation.

Within each composite ACF the locations of the two strongest peaks are obtained. These locations are the candidate pitch lags for the corresponding pitch window, and take values in the range 20–120 which is inclusive. In conjunction with the two peaks from the last composite ACF of the previous frame i.e., for window 5 in the previous frame, results in a set of 5 peak pairs, leading to 32 possible pitch tracks through the current frame. A pitch metric is used to maximize the continuity of the pitch track as well as the value of the ACF peaks along the pitch track to select one of these pitch tracks. The end point of the optimal pitch track determines the pitch period p₈ and a pitch gain β_(pitch) for the current frame. Note that due to the position of the pitch windows, the pitch period and pitch gain are aligned with the right edge of the current frame The pitch period is integer valued and takes on values in the range 20–120. It is mapped to a 7-bit pitch index l*_(p) in the range of about 0–101.

In respect to the prototype extraction module 108 and the pitch estimation and interpolation module 110, the pitch period is converted to the radian pitch frequency corresponding to the right edge of the frame by $\begin{matrix} {\omega_{8} = {\frac{2\pi}{p_{8}}.}} & (24) \end{matrix}$ A subframe pitch frequency contour is created by linearly interpolating between the pitch frequency of the left edge ω₀ and the pitch frequency of the right edge ω₈: $\begin{matrix} {{\omega_{m} = \frac{{\left( {8 - m} \right)\omega_{0}} + {m\;\omega_{8}}}{8}},\mspace{14mu}{1 \leq m \leq 8.}} & (25) \end{matrix}$ If there are abrupt discontinuities between the left edge and the right edge pitch frequencies, the above interpolation is modified to make a switch from the pitch frequency to its integer multiple or submultiple at one of the subframe boundaries. It should be noted that the left edge pitch frequency ω₀ is the right edge pitch frequency of the previous frame. The index of the highest pitch harmonic within the 4000 Hz band is computed for each subframe by $\begin{matrix} {{K_{m}\left\lfloor \frac{\pi}{\omega_{m}} \right\rfloor},{1 \leq m \leq 8.}} & (26) \end{matrix}$

The LSFs are quantized by a hybrid scalar-vector quantization scheme. The first 6 LSFs are scalar quantized using a combination of intraframe and interframe prediction using 4 bits/LSF. The last 4 LSFs are vector quantized using 7 bits. Thus, a total of 31 bits are used for the quantization of the 10-dimensional LSF vector.

The 16 level scalar quantizers for the first 6 LSFs in a preferred embodiment of the present invention is designed using a Linde-Buzo-Gray algorithm. An LSF estimate is obtained by adding each quantizer level to a weighted combination of the previous quantized LSF of the current frame and the adjacent quantized LSFs of the previous frame: $\begin{matrix} {{{\lambda\left( {l,m} \right)} = \begin{Bmatrix} {{{S_{L,m}(l)} + {0.375{{\hat{\lambda}}_{prev}\left( {m + 1} \right)}}},} & {{m = 0},} \\ {{S_{L,m}(l)} + {0.375\left( {{{\hat{\lambda}}_{prev}\left( {m + 1} \right)} -} \right.}} & {{1 \leq m \leq 5},} \\ {{\left. \mspace{20mu}{{\hat{\lambda}}_{prev}\left( {m - 1} \right)} \right) + {\hat{\lambda}\left( {m - 1} \right)}},} & \; \end{Bmatrix}}{0 \leq l \leq 15.}} & (27) \end{matrix}$ Here, {{circumflex over (λ)}(m),0≦m<6} are the first 6 quantized LSFs of the current frame and {{circumflex over (λ)}_(prev)(m),0≦m≦10} are the quantized LSFs of the previous frame. {S_(L,m)(l),0≦m<6,0≦l≦15} are the 16 level scalar quantizer tables for the first 6 LSFs. The squared distortion between the LSF and its estimate is minimized to determine the optimal quantizer level: $\begin{matrix} {{{\underset{0 \leq l \leq 15}{MIN}\left( {{\lambda(m)} - {\overset{\sim}{\lambda}\left( {l,m} \right)}} \right)}^{2}\mspace{11mu} 0} \leq m \leq 5.} & (28) \end{matrix}$

If l*_(L) _(—) _(S) _(—) _(m) is the value of l that minimizes the above distortion, the quantized LSFs are given by: $\begin{matrix} {{\hat{\lambda}(m)} = \left\{ \begin{matrix} {{{S_{L,m}\left( l_{{L\_ S}{\_ m}}^{*} \right)} + {0.375{{\hat{\lambda}}_{prev}\left( {m + 1} \right)}}},} & {m = 0} \\ {{S_{L,m}\left( l_{{L\_ S}{\_ m}}^{*} \right)} + {0.375{{\hat{\lambda}}_{prev}\left( {m + 1} \right)}} -} & {1 \leq m \leq 5.} \\ {{\left. \mspace{45mu}{{\hat{\lambda}}_{prev}\left( {m - 1} \right)} \right) + {\hat{\lambda}\left( {m - 1} \right)}},} & \; \end{matrix} \right.} & (29) \end{matrix}$ The last 4 LSFs are vector quantized using a weighted mean squared error (WMSE) distortion measure. The weight vector {W_(L)(m),6≦m≦9} is computed by the following procedure: $\begin{matrix} {{{{p1}(m)} = {\prod\limits_{{i = 0},2,4,6,8}\;\left\{ {4 + {\cos^{2}\left( {2{{\pi\lambda}(m)}} \right)} + {\cos^{2}\left( {2{{\pi\lambda}(i)}} \right)} - {8{\cos\left( {2{{\pi\lambda}(m)}} \right)}{\cos\left( {2{{\pi\lambda}(i)}} \right)}}} \right\}}},\mspace{11mu}{6 \leq m \leq 9.}} & (30) \\ {{{{p2}(m)} = {\prod\limits_{{i = 1},3,5,7,9}\;\left\{ {4 + {\cos^{2}\left( {2{{\pi\lambda}(m)}} \right)} + {\cos^{2}\left( {2{{\pi\lambda}(i)}} \right)} - {8{\cos\left( {2{{\pi\lambda}(m)}} \right)}{\cos\left( {2{{\pi\lambda}(i)}} \right)}}} \right\}}},\mspace{11mu}{6 \leq m \leq 9.}} & (31) \\ {{{W_{L}(m)} = \left\lbrack \frac{1.09 - {0.6{\cos\left( {2{{\pi\lambda}(m)}} \right)}}}{\left( {0.5 + {0.5{\cos\left( {2{{\pi\lambda}(m)}} \right)}{{p1}(m)}} + \left( {0.5 - {0.5{\cos\left( {2{{\pi\lambda}(m)}} \right)}{{p2}(m)}}} \right.} \right.} \right\rbrack^{025}},{6 \leq m \leq 9.}} & (32) \end{matrix}$

A set of predetermined mean values {λ_(dc)(m),6≦m<9} are used to remove the DC bias in the last 4 LSFs prior to quantization. These LSFs are estimated based on the mean removed quantized LSFs of the previous frame: {tilde over (λ)}(l,m)=V _(L)(l,m−6)+λ_(dc)(m)+0.5({circumflex over (λ)}_(prev)(m)−λ_(dc)(m)), 0≦l≦127,6≦m≦9.  (33)

Here {V_(L)(l,m),0≦l≦127,0≦m<3} is the 128 level, 4-dimensional codebook for the last 4 LSFs. The optimal code vector is determined by minimizing the WMSE between the estimated and the original LSF vectors: $\begin{matrix} {\underset{0 \leq l \leq 127}{MIN}{\sum\limits_{m = 6}^{9}\;{{W_{L}(m)}{\left( {{\lambda(m)} - {\overset{\sim}{\lambda}\left( {l,m} \right)}} \right)^{2}.}}}} & (34) \end{matrix}$

If l*_(L) _(—) _(V) is the value of l that minimizes the above distortion, the quantized LSF subvector is given by: {circumflex over (λ)}(m)=V _(L)(l* _(L) _(—) _(V) ,m−6)+λ_(dc)(m)+0.5({circumflex over (λ)}_(prev)(m)−λ_(dc)(m)), 6≦m≦9.  (35)

The stability of the quantized LSFs is checked by ensuring that the LSFs are monotonically increasing and are separated by a minimum value of about 0.008. If this criteria is not satisfied, stability is enforced by reordering the LSFs in a monotonically increasing order. If a minimum separation is not achieved, the most recent stable quantized LSF vector from a previous frame is substituted for the unstable LSF vector. The 6 4-bit SQ indices {l*_(L) _(—) _(S) _(—) _(m),0≦m≦5} and the 7-bit VQ index l*_(L) _(—) _(V) are transmitted to the decoder. Thus the LSFs are encoded using a total of 31 bits.

The inverse quantized LSFs are interpolated each subframe by preferably linear interpolation between the current LSFs {{circumflex over (λ)}(m),0≦m≦10} and the previous LSFs {{circumflex over (λ)}_(prev)(m),0≦m≦10}. The interpolated LSFs at each subframe are converted to LP parameters {â_(m)(l),0≦m≦10,1≦l≦8}.

The prediction residual signal for the current frame is computed using the noise reduced speech signal {s_(nr)(n)} and the interpolated LP parameters. Residual is computed from the midpoint of a subframe to the midpoint of the next subframe, using the interpolated LP parameters corresponding to the center of this interval. This ensures that the residual is computed using locally optimal LP parameters. The residual for the past data as shown in FIG. 2 is preserved from the previous frame and is also used for PW extraction.

Further, residual computation extends 93 samples into the look-ahead part of the buffer to facilitate PW extraction. LP parameters of the last subframe are used computing the look-ahead part of the residual. By denoting the interpolated LP parameters for the j^(th) subframe (0≦j≦8) of the current frame by {â_(m)(j),0≦m≦10}, residual computation can be represented by: ${e_{lp}(n)} = \left\{ \begin{matrix} {\sum\limits_{m = 0}^{M}\;{{S_{nr}\left( {n - m} \right)}{{\hat{a}}_{m}(0)}}} & {{80 \leq n < 90},} \\ {\sum\limits_{m = 0}^{M}\;{{S_{nr}\left( {n - m} \right)}{{\hat{a}}_{m}(j)}}} & {{1 \leq j \leq {{7\mspace{14mu} 20j} + 70} \leq n < {{20j} + 90}},} \\ {\sum\limits_{m = 0}^{M}\;{{S_{nr}\left( {n - m} \right)}{{\hat{a}}_{m}(8)}}} & {230 \leq n \leq 332.} \end{matrix} \right.$ The residual for past data, {e_(lp)(n),0≦n<80} is preserved from the previous frame.

The invention will now be discussed in reference to PW extraction. The prototype waveform in the time domain is essentially the waveform of a single pitch cycle, which contains information about the characteristics of the glottal excitation. A sequence of PWs contains information about the manner in which the excitation is changing across the frame. A time-domain PW is obtained for each subframe by extracting a pitch period long segment approximately centered at each subframe boundary. The segment is centered with an offset of up to ±10 samples relative to the subframe boundary, so that the segment edges occur at low energy regions of the pitch cycle. This minimizes discontinuities between adjacent PWs. For the m^(th) subframe, the following region of the residual waveform is considered to extract the PW: $\begin{matrix} \left\{ {{e_{lp}\left( {80 + {20m} + n} \right)},{{{- \frac{p_{m}}{2}} - 12} \leq n \leq {\frac{p_{m}}{2} + 12}}} \right\} & (37) \end{matrix}$ where p_(m) is the interpolated pitch period (in samples) for the m^(th) subframe. The PW is selected from within the above region of the residual, so as to minimize the sum of the energies at the beginning and at the end of the PW. The energies are computed as sums of squares within a 5-point window centered at each end point of the PW, as the center of the PW ranges over the center offset of about ±10 samples: $\begin{matrix} {{E_{end}(i)} = {{{\sum\limits_{j = {- 2}}^{2}\;{e_{lp}^{2}\left( {80 + {20m} - \frac{p_{m}}{2} + i + j} \right)}} + {\sum\limits_{j = {- 2}}^{2}\;{e_{lp}^{2}\left( {80 + {20m} + \frac{p_{m}}{2} + i + j} \right)}} - 10} \leq i \leq 10.}} & (38) \end{matrix}$

The center offset resulting in the smallest energy sum determines the PW. If i_(min)(m) is the center offset at which the segment end energy is minimized, i.e., E _(end)(i _(min)(m))≦E _(end)(i) −10≦i≦10,  (39) the time-domain PW vector for the m^(th) subframe is $\left\{ {{e_{lp}\left( {80 + {20m} - \frac{p_{m}}{2} + {i_{\min}(m)} + n} \right)},\mspace{14mu}{0 \leq n < p_{m}}} \right\}.$ This is transformed by a p_(m)-point discrete Fourier transform (DFT) into a complex valued frequency-domain PW vector: $\begin{matrix} {{{P_{m}^{\prime}(k)}{\sum\limits_{n = 0}^{p_{m} - 1}{{e_{lp}\left( {80 + {20\; m} - \frac{p_{m}}{2} + {i_{\min}(m)} + n} \right)}e^{{- j}\;\omega_{m}{kn}}}}}{0 \leq k \leq {K_{m}.}}} & (40) \end{matrix}$ Here, ω_(m) is the radian pitch frequency and K_(m) is the highest in-band harmonic index for the m^(th) subframe (see equation 17). The frequency domain PW is used in all subsequent operations in the encoder. The above PW extraction process is carried out for each of the 8 subframes within the current frame, so that the residual signal in the current frame is characterized by the complex PW vector sequence {P′_(m)(k), 0≦k≦K_(m), 1≦m≦8}. In addition, an approximate PW is computed for subframe 1 of the look ahead frame, to facilitate a 3-point smoothing of PW gain and magnitude. Since the pitch period is not available for the look-ahead part of the buffer, the pitch period at the end of the current frame, i.e., p₈, is used in extracting this PW. The region of the residual used to extract this extra PW is $\begin{matrix} {\left\{ {{e_{lp}\left( {260 + n} \right)},{{{- \frac{p_{8}}{2}} - 12} \leq n \leq {\frac{p_{8}}{2} + 12}}} \right\}.} & (41) \end{matrix}$

By minimizing the end energy sum as before, the time-domain PW vector is obtained as $\left\{ {{e_{lp}\left( {260 - \frac{p_{8}}{2} + {i_{\min}(9)} + n} \right)},{0 \leq n < p_{8}}} \right\}.$ The frequency-domain PW vector is designated by P₉ and is computed by the following DFT: $\begin{matrix} {{{P_{9}^{\prime}(k)}{\sum\limits_{n = 0}^{p_{8} - 1}{{e_{lp}\left( {260 - \frac{p_{8}}{2} + {i_{\min}(9)} + n} \right)}e^{{{- j}\;\omega_{8}{kn}}\mspace{14mu}}0}}} \leq k \leq {K_{8}.}} & (42) \end{matrix}$ It should be noted that the approximate PW is only used for smoothing operations and not as the PW for subframe 1 during the encoding of the next frame. Rather, it is replaced by the exact PW computed during the next frame.

Each complex PW vector can be further decomposed into a scalar gain component representing the level of the PW vector and a normalized complex PW vector representing the shape of the PW vector. Such a decomposition, permits vector quantization that is efficient in terms of computation and storage with minimal degradation in quantization performance. The PW gain is the root-mean square (RMS) value of the complex PW vector. It is obtained by $\begin{matrix} \begin{matrix} {{g_{pw}^{\prime}(m)} = \sqrt{\frac{1}{{2\; K_{m}} + 2}\;{\sum\limits_{k = 0}^{K_{m}}{{P_{m}^{\prime}(k)}}^{2}}}} & {1 \leq m \leq 8.} \end{matrix} & (43) \end{matrix}$

PW gain is also computed for the extra PW by $\begin{matrix} {{g_{pw}^{\prime}(9)} = {\sqrt{\frac{1}{{2\; K_{8}} + 2}\;{\sum\limits_{k = 0}^{K_{8}}{{P_{9}^{\prime}(k)}}^{2}}}.}} & (44) \end{matrix}$

A normalized PW vector sequence is obtained by dividing the PW vectors by the corresponding gains: $\begin{matrix} {{{P_{m}(k)} = {{\frac{P_{m}^{\prime}(k)}{g_{m}^{\prime}(m)}\mspace{14mu} 0} \leq k \leq K_{m}}},{1 \leq m \leq 8.}} & (45) \\ {{P_{9}^{\prime}(k)} = {{\frac{P_{9}^{\prime}(k)}{g_{pw}^{\prime}(9)}\mspace{14mu} 0} \leq k \leq {K_{8}.}}} & (46) \end{matrix}$

For a majority of frames, especially during stationary intervals, gain values change slowly from one subframe to the next. This makes it possible to decimate the gain sequence by a factor of about 2, thereby reducing the number of values that need to be quantized. Prior to decimation, the gain sequence is smoothed by a 3-point window, to eliminate excessive variations across the frame. The smoothing operation is in the logarithmic gain domain and is represented by g″ _(pw)(m)=0.3 log₁₀ g′ _(pw)(m−1)+0.4 log₁₀ g′ _(pw)(m)+0.3 log₁₀ g′ _(pw)(m+1) 1≦m≦8.  (47)

Conversion to logarithmic domain is advantageous since it corresponds to the scale of loudness of sound perceived by the human ear. The smoothed gain values are transformed by the following transformation: $\begin{matrix} {{g_{pw}(m)} = \left\{ \begin{matrix} 0 & {{{g_{pw}^{''}(m)} > 4.5},} & \; \\ {90 - {20\;{g_{pw}^{''}(m)}}} & {{0 \leq {g_{pw}^{''}(m)} \leq 4.5},} & {1 \leq m \leq 8} \\ 90 & {{g_{pw}^{''}(m)} < 0.} & \; \end{matrix} \right.} & (48) \end{matrix}$

This transformation limits extreme (very low or very high) values of the gain and thereby improves quantizer performance, especially for low-level signals. The transformed gains are decimated by a factor of 2, requiring that only the even indexed values, i.e., {g_(pw)(2), g_(pw)(4), g_(pw)(6), g_(pw)(8)}, are quantized.

At the decoder 100B, the odd indexed values are obtained by linearly interpolating between the inverse quantized even indexed values.

A 256 level, 4-dimensional vector quantizer is used to quantize the above gain vector. The design of the vector quantizer is one of the novel aspects of this algorithm. The PW gain sequence can exhibit two distinct modes of behavior. During stationary signals, such as voiced intervals, variations of the gain sequence across a frame are small.

On the other hand, during non-stationary signals such as voicing onsets, the gain sequence can exhibit large variations across a frame. The vector quantizer used must be able to represent both types of behavior. On the average, stationary frames far outnumber the non-stationary frames.

If a vector quantizer is trained using a database, which does not distinguish between the two types, the training is dominated by stationary frames leading to poor performance for non-stationary frames. To overcome this problem, the vector quantizer design was modified by classifying the PW gain vectors classified into a stationary class and a non-stationary class.

For the 256 level codebook, 192 levels were allocated to represent stationary frames and the remaining 64 were allocated for non-stationary frames. The 192 level codebook is trained using the stationary frames, and the 64 level codebook is trained using the non-stationary frames. The training algorithm with a binary split and random perturbation is based on the generalized Lloyd algorithm disclosed in “An algorithm for Vector Quantization Design”, by Y. Linde, A. Buzo and R. Gray, pages 84–95 of IEEE Transactions on Communications, VOL. COM-28, No. 1, January 1980 which is incorporated by reference in its entirety. In the case of the stationary codebook, a ternary split is used to derive the 192 level codebook from a 64 level codebook in the final stage of the training process. The 192 level codebook and the 64 level codebook are concatenated to obtain the 256-level gain codebook. The stationary/non-stationary classification is used only during the training phase. During quantization, stationary/non-stationary classification is not performed. Instead, the entire 256-level codebook is searched to locate the optimal quantized gain vector. The quantizer uses a mean squared error (MSE) distortion metric: $\begin{matrix} {{{D_{g}(l)} = {{\sum\limits_{m = 1}^{4}{\left\lbrack {{g_{pw}\left( {2\; m} \right)} - {V_{g}\left( {l,m} \right)}} \right\rbrack^{2}\mspace{14mu} 0}} \leq l \leq 255}},} & (49) \end{matrix}$ where, {V_(g)(l,m), 0≦l≦255, 1≦m≦4} is the 256 level, 4-dimensional gain codebook and D_(g)(l) is the MSE distortion for the l^(th) codevector. In another embodiment of the present invention the optimal codevector {V_(g)(l*_(g),m), 1≦m≦4} is the one which minimizes the distortion measure over the entire codebook, i.e., D _(g)(l* _(g))≦D _(g)(l) 0≦l≦255.  (50) The 8-bit index of the optimal code-vector l*_(g) is transmitted to the decoder as the gain index.

FIG. 5 is a block diagram showing the separation of stationary and nonstationary components of a PW in accordance with an embodiment of the present invention and occurs in compute subband nonstationary measure module 116. In the FDI algorithm, only the PW magnitude information is explicitly encoded. PW Phase is not encoded explicitly since the replication of phase spectrum is not necessary for achieving a natural quality in reconstructed speech. However, this does not imply that an arbitrary phase spectrum can be employed at the decoder. One important requirement on the phase spectrum used at the decoder 100B is that it produces the correct degree of periodicity i.e., pitch cycle stationarity across the frequency band. Achieving the correct degree of periodicity is extremely important to reproduce natural sounding speech.

The generation of the phase spectrum at the decoder 100B is facilitated by measuring pitch cycle stationarity at the encoder as a ratio of the energy of the non-stationary component to that of the stationary component in the PW sequence. Further, this energy ratio is measured over 5 subbands spanning the frequency band of interest, resulting in a 5-dimensional vector nonstationarity measure in each frame. This vector is quantized and transmitted to the decoder, where it is used to generate phase spectra that lead to the correct degree of periodicity across the band. The first step in measuring the stationarity of PW is to align the PW sequence.

In order to measure the degree of stationarity of the PW sequence, it is necessary to align each PW to the preceding PW. The alignment process applies a circular shift to the pitch cycle to remove apparent differences in adjacent PWs that are due to temporal shifts or variations in pitch frequency. Let {tilde over (P)}_(m−1) denote the aligned PW corresponding to subframe m−1 and let {tilde over (θ)}_(m−1) be the phase shift that was applied to P_(m−1) to derive {tilde over (P)}_(m−1). In other words, {tilde over (P)} _(m−1)(k)=P _(m−1)(k)e ^(j{tilde over (θ)}) ^(m−1) ^(k) 0≦k≦K _(m−1).  (51)

For the alignment of P_(m) to {tilde over (P)}_(m−1), if the residual signal is perfectly periodic with the pitch period being an integer number of samples, P_(m) and P_(m−1) are identical except for a circular shift. In this case, the pitch cycle for the m^(th) subframe is identical to the pitch cycle for the m−1^(th) subframe, except that the starting point for the former is at a later point in the pitch cycle compared to the latter. The difference in starting point arises due to the advance by a subframe interval and differences in center offsets at subframes m and m−1. With the subframe interval of 20 samples and with center of offsets of i_(min)(m) and i_(min)(m−1), it can be seen that the m^(th) pitch cycle is ahead of the m−1^(th) pitch cycle by 20+i_(min)(m)−i_(min)(m−1) samples. If the pitch frequency is ω_(m), a phase shift of −ω_(m)(20+i_(min)(m)−i_(min)(m−1)) is necessary to correct for this phase difference and align P_(m) with P_(m−1). In addition, since P_(m−1) has been circularly shifted by {tilde over (θ)}_(m−1) to derive {tilde over (P)}_(m−1), it follows that the phase shift needed to align P_(m) with {tilde over (P)}_(m−1) is a sum of these two phase shifts and is given by {tilde over (θ)}_(m−1)−ω_(m)(20+i _(min)(m)−i _(min)(m−1)).  (52)

In practice, the residual signal is not perfectly periodic and the pitch period can be non-integer valued. In such a case, the above cannot be used as the phase shift for optimal alignment. However, for quasi-periodic signals, the above phase angle can be used as a nominal shift and a small range of angles around this nominal shift angle are evaluated to find a locally optimal shift angle. Satisfactory results have been obtained with about an angle range of ±0.2π centered around the nominal shift angle, searched in steps of about 0.04π. For each shift within this range, the shifted version of P_(m) is correlated against {tilde over (P)}_(m−1). The shift angle that results in the maximum correlation is selected as the locally optimal shift. This correlation maximization can be represented by $\underset{{- 5} \leq i \leq 5}{MAX}{\sum\limits_{k = 0}^{K_{m}}{{Re}\left\lbrack {{{\overset{\sim}{P}}_{m - 1}(k)}\;{P_{m}^{''}(k)}\; e^{{- {j{({{\overset{\sim}{\theta}}_{m - 1} - {\omega_{m}{({20 + {i_{\min}{(m)}} - {i_{\min}{({m - 1})}}})}} + {004\;\pi\; i}})}}}k}} \right\rbrack}}$ where * represents complex conjugation and Re[ ] is the real part of a complex vector. If i=i_(max) maximizes the above correlation, then the locally optimal shift angle is {tilde over (θ)}_(m)={tilde over (θ)}_(m−1)−ω_(m)(20+i _(min)(m)−i _(min)(m−1))+0.04πi _(max)  (54) and the aligned PW for the m^(th) subframe is obtained from {tilde over (P)} _(m)(k)=P _(m)(k)e ^(j{tilde over (θ)}) ^(m) ^(k) 0≦k≦K _(m).  (55)

The process of alignment results in a sequence of aligned PWs from which any apparent dissimilarities due to shifts in the PW extraction window, pitch period etc. have been removed. Only dissimilarities due to the shape of the pitch cycle or equivalently the residual spectral characteristics are preserved. Thus, the sequence of aligned PWs provides a means of measuring the degree of change taking place in the residual spectral characteristics i.e., the degree of stationarity of the residual spectral characteristics. The basic premise of the FDI algorithm is that it is important to encode and reproduce the degree of stationarity of the residual in order to produce natural sounding speech at the decoder. Consider the temporal sequence of aligned PWs along the k^(th) harmonic track, i.e., {{tilde over (P)} _(m)(k),1≦m≦8}.  (56)

If the signal is perfectly periodic, the k^(th) harmonic is identical for all subframes, and the above sequence is a constant as a function of m. If the signal is quasi-periodic, the sequence exhibits slow variations across the frame, but is still a predominantly low frequency waveform. It should be noted that here frequency refers to evolutionary freuency, related to the rate at which PW changes across a frame. This is in contrast to harmonic frequency, which is the frequency of the pitch harmonic. Thus, a high frequency harmonic component changing slowly across the frame is said to have low evolutionary frequency content. Or a low frequency harmonic component changing rapidly across the frame is said to have high evolutionary frequency content.

As the signal periodicity decreases, variations in the above PW sequence increase, with decreasing energy at lower freuencies and increasing energy at higher frequencies. At the other extreme, if the signal is aperiodic, the PW sequence exhibits large variations across the frame, with a near uniform energy distribution across frequency. Thus, by determining the spectral energy distribution of aligned PW sequences along a harmonic track, it is possible to obtain a measure of the periodicity of the signal at that harmonic frequency. By repeating this analysis at all the harmonics within the band of interest, a frequency dependent measure of periodicity can be constructed.

The relative distribution of spectral energy of variations of PW between low and high frequencies can be determined by passing the aligned PW sequence along each harmonic track through a low pass filter and a high pass filter. In an embodiment of the present invention, the low pass filter used is a 3^(rd) order chebyshev filter with a 3 dB cutoff at 35 Hz (for the PW sampling frequency of 400 Hz), with the following transfer function: $\begin{matrix} {{H_{{lpf}\; 2}(z)} = {\frac{\begin{matrix} {0.063536 - {0.039167\; z^{- 1}} -} \\ {{0.039167\; z^{- 2}} + {0.063536\; z^{- 3}}} \end{matrix}}{1 - {2.2255\; z^{1}} + {1.8542\; z^{- 2}} - {5.1726\; z^{- 3}}}.}} & (57) \end{matrix}$ The high pass filter used is also a 3^(rd) order chebyshev filter with a 3 dB cutoff at 18 Hz with the following transfer function: $\begin{matrix} {{H_{{hpf}\; 2}(z)} = {\frac{\begin{matrix} {0.71923 - {2.1146\; z^{- 1}} +} \\ {{2.1146\; z^{- 2}} - {0.71923\; z^{- 3}}} \end{matrix}}{1 - {2.2963\; z^{1}} + {1.8542\; z^{- 2}} - {5.1726\; z^{- 3}}}.}} & (58) \end{matrix}$

The output of the low pass filter is the stationary component of the PW that gives rise to pitch cycle periodicity and is denoted by {S_(m)(k), 0≦k≦K_(m), 1≦m≦8}. The output of the high pass filter is the nonstationary component of PW that gives rise to pitch cycle aperiodicity and is denoted by {R_(m)(k), 0≦k≦K_(m), 1≦m≦8}. The energies of these components are computed in subbands and then averaged across the frame.

The harmonics of the stationary and nonstationary components are grouped into 5 subbands spanning the frequency band of interest where the band-edges in Hz is defined by the array B _(rs)=[1 400 800 1600 2400 3400].  (59) The subband edges in Hz can be translated to subband edges in terms of harmonic indices such that the i^(th) subband contains harmonics with indices {η_(m)(i−1)≦k<η_(m)(i), 1≦i≦5} as follows: ${{\eta_{m}(i)} = \begin{Bmatrix} {2 + \left\lfloor \frac{{B_{rs}(i)}K_{m}}{4000} \right\rfloor} & {{\left\{ {1 + \left\lfloor \frac{{B_{rs}(i)}K_{m}}{4000} \right\rfloor} \right\} < \frac{{B_{rs}(i)}\pi}{4000\;\omega_{m}}},} \\ \left\lfloor \frac{{B_{rs}(i)}K_{m}}{4000} \right\rfloor & {{\left\lfloor \frac{{B_{rs}(i)}K_{m}}{4000} \right\rfloor > \frac{{B_{rs}(i)}\pi}{4000\;\omega_{m}}},} \\ {1 + \left\lfloor \frac{{B_{rs}(i)}K_{m}}{4000} \right\rfloor} & {{otherwise}.} \end{Bmatrix}},{0 \leq i \leq 5},{1 \leq m \leq}$ The energy in each subband is computed by averaging the squared magnitude of each harmonic within the subband. For the stationary component, the subband energy distribution for the m^(th) subframe is computed by $\begin{matrix} {{{ES}_{m}(l)} = {{\frac{1}{2\;\left( {{\eta_{m}(l)} - {\eta_{m}\left( {l - 1} \right)}} \right)}{\sum\limits_{k = {\eta_{m}{({l - 1})}}}^{{\eta_{m}{(l)}} - 1}{{{S_{m}(k)}}^{2}\mspace{14mu} 1}}} \leq l \leq 5.}} & (61) \end{matrix}$ For the nonstationary component, the subband energy distribution for the m^(th) subframe is computed by $\begin{matrix} {{{ER}_{m}(l)} = {{\frac{1}{2\;\left( {{\eta_{m}(l)} - {\eta_{m}\left( {l - 1} \right)}} \right)}{\sum\limits_{k = {\eta_{m}{({l - 1})}}}^{{\eta_{m}{(l)}} - 1}{{{R_{m}(k)}}^{2}\mspace{14mu} 1}}} \leq l \leq 5.}} & (62) \end{matrix}$ Next, these subframe energies are averaged across the frame: $\begin{matrix} \begin{matrix} {{{{ES}_{avg}(l)} = {\frac{1}{8}\;{\sum\limits_{m = 1}^{8}{{ES}_{m}(l)}}}},} & {1 \leq l \leq 5.} \end{matrix} & (63) \\ \begin{matrix} {{{{ER}_{avg}(l)} = {\frac{1}{8}\;{\sum\limits_{m = 1}^{8}{{ER}_{m}(l)}}}},} & {1 \leq l \leq 5.} \end{matrix} & (64) \end{matrix}$ The subband nonstationarity measure is computed as the ratio of the energy of the nonstationary component to that of the stationary component in each subband: $\begin{matrix} {\;{{{(l)} = \frac{{ER}_{avg}(l)}{{ES}_{avg}(l)}},\mspace{14mu}{1 \leq l \leq 5.}}} & (65) \end{matrix}$

If this ratio is very low, it indicates that the PW sequence has much higher energy at low evolutionary frequencies than at high evolutionary frequencies, corresponding to a predominantly periodic signal or stationary PW sequence. On the other hand, if this ratio is very high, it indicates that the PW sequence has much higher energy at high evolutionary frequencies than at low evolutionary frequencies, corresponding to a predominantly aperiodic signal or nonstationary PW sequence. Intermediate values of the ratio indicate different mixtures of periodic and aperiodic components in the signal or different degrees of stationarity of the PW sequence. This information can be used at the decoder to create the correct degree of variation from one PW to the next, as a function of frequency and thereby realize the correct degree of periodicity in the signal.

In case of nonstationary voiced signals, where the pitch cycle is changing rapidly across the frame, the nonstationarity measure may have high values even in low frequency bands. This is usually a characteristic of unvoiced signals and usually translates to a noise-like excitation at the decoder. However, it is important that non-stationary voiced frames are reconstructed at the decoder with glottal pulse-like excitation rather than with noise-like excitation. This information is conveyed by a scalar parameter called a voicing measure, which is a measure of the degree of voicing of the frame. During stationary voiced and unvoiced frames, there is some correlation between the nonstationarity measure and the voicing measure. However, while the voicing measure indicates if the excitation pulse should be a glottal pulse or a noiselike waveform, the nonstationarity measure indicates how much this excitation pulse should change from subframe to subframe. The correlation between the voicing measure and the nonstationarity measure is exploited by vector quantizing these jointly.

The voicing measure is estimated for each frame based on certain characteristics correlated with the voiced/unvoiced nature of the frame. It is a heuristic measure that assigns a degree of voicing to each frame in the range 0–1, with a zero indicating a perfectly voiced frame and a one indicating a completely unvoiced frame.

The voicing measure is determined based on six measured characteristics of the current frame which are, the average of the nonstationarity measure in the 3 low frequency subbands, a relative signal power which is computed as the difference between the signal power of the current frame and a long term average signal power, the pitch gain, the average correlation between adjacent aligned PWs, the 1^(st) reflection coefficient obtained during LP Analysis, and the variance of the candidate pitch lags computed during pitch estimation.

The (squared) normalized correlation between the aligned PW of the m^(th) and m−1^(th) frames is obtained by $\begin{matrix} {\gamma_{m} = {\frac{\left\lbrack {\sum\limits_{k = 1}^{6}{{{\overset{\sim}{P}}_{m}(k)}{{\overset{\sim}{P}}_{m - 1}(k)}}} \right\rbrack^{2}}{\sum\limits_{k = 1}^{6}{{{{\overset{\sim}{P}}_{m}(k)}}^{2}{\sum\limits_{k = 1}^{6}{{{\overset{\sim}{P}}_{m - 1}(k)}}^{2}}}}.}} & (66) \end{matrix}$

It should be noted that the upper limit of the summations are limited to 6 rather than K_(m) to reduce computational complexity. This subframe correlation is averaged across the frame to obtain an average PW correlation: $\begin{matrix} {\gamma_{avg} = {\frac{1}{8}{\sum\limits_{m = 1}^{8}{\gamma_{m}.}}}} & (67) \end{matrix}$ The average PW correlation is a measure of pitch cycle to pitch cycle correlation after variations due to signal level, pitch period and PW extraction offset have been removed. It exhibits a strong correlation to the nature of glottal excitation. As mentioned earlier, the nonstationarity measure, especially in the low frequency subbands, has a strong correlation to the voicing of the frame. An average of the nonstationarity measure for the 3 lowest subbands provides a useful parameter in inferring the nature of the glottal excitation. This average is computed as ⁢ avg = 1 3 ⁢ ∑ l = 1 3 ⁢ l . ( 68 ) It will be appreciated by those skilled in the art that subbands other than the three lowest subbands can be used without departing from the scope of the present invention.

The pitch gain is a parameter that is computed as part of the pitch analysis function. It is essentially the value of the peak of the autocorrelation function (ACF) of the residual signal at the pitch lag. To avoid spurious peaks, the ACF used in the embodiment of this invention is a composite autocorrelation function, computed as a weighted average of adjacent residual raw autocorrelation functions.

The pitch gain, denoted by β_(pitch), is the value of the peak of a composite autocorrelation function. The composite ACF are evaluated once every 40 samples within each frame at 80, 120, 160, 200 and 240 samples as shown in FIG. 2. For each of the 5 ACF, the location of the peak ACF is selected as a candidate pitch period. The variation among these 5 candidate pitch lags is also a measure of the voicing of the frame. For unvoiced frames, these vales exhibit a higher variance than for voiced frames. The mean is computed as $\begin{matrix} {{p\_ cand}_{avg} = {\frac{1}{5}{\sum\limits_{l = 0}^{4}{{p\_ cand}_{l}.}}}} & (69) \end{matrix}$ The variation is computed by the average of the absolute deviations from this mean: $\begin{matrix} {p_{var} = {\frac{1}{5}{\sum\limits_{l = 0}^{4}{{{{p\_ cand}_{avg} - {p\_ cand}_{l}}}.}}}} & (70) \end{matrix}$ This parameter exhibits a moderate degree of correlation to the voicing of the signal.

The signal power also exhibits a moderate degree of correlation to the voicing of the signal. However, it is important to use a relative signal power rather than an absolute signal power, to achieve robustness to input signal level deviations from nominal values. The signal power in dB is defined as $\begin{matrix} {E_{sig} = {10{{\log_{10}\left\lbrack {\frac{1}{160}{\sum\limits_{n = 80}^{239}{s^{2}(n)}}} \right\rbrack}.}}} & (71) \end{matrix}$

An average signal power can be obtained by exponentially averaging the signal power during active frames. Such an average can be computed recursively using the following equation: E _(sigavg)=0.95E _(sigavg)+0.05E _(sig).  (72)

A relative signal power can be obtained as the difference between the signal power and the average signal power: E _(sigrel) =E _(sig) −E _(sigavg).  (73)

The relative signal power measures the signal power of the frame relative a long term average. Voiced frames exhibit moderate to high values of relative signal power, whereas unvoiced frames exhibit low values.

The 1^(st) reflection coefficient ρ₁ is obtained as a byproduct of LP analysis during Levinson-Durbin recursion. Conceptually it is equivalent to the 1^(st) order normalized autocorrelation coefficient of the noise reduced speech. During voiced speech segments, the speech spectrum tends to have a low pass characteristic, which results in a ρ₁ close to 1. During unvoiced frames, the speech spectrum tends to have a flatter or high pass characteristic, resulting in smaller or even negative values for ρ₁.

To derive the voicing measure, each of these six parameters are nonlinearly transformed using sigmoidal functions such that they map to the range 0–1, close to 0 for voiced frames and close to 1 for unvoiced frames. The parameters for the sigmoidal transformation have been selected based on an analysis of the distribution of these parameters. The following are the transformations for each of these parameters: n pg = 1 - 1 ( 1 + ⅇ - 12 ⁢ ( β pitch - 0.48 ) ) ( 74 ) n pw = { 1 - 1 ( 1 + ⅇ - 10 ⁢ ( γ avg - 0.72 ) ) γ avg ≤ 0.72 1 - 1 ( 1 + ⅇ - 13 ⁢ ( γ avg - 0.72 ) ) γ avg > 0.72 ( 75 ) n = { 1 ( 1 + ⅇ - 7 ⁢ ( avg - 0 ⁢ ⁢ 85 ) ) avg ≤ 0.85 1 ( 1 + ⅇ - 3 ⁢ ( avg - 0.72 ) ) avg > 0.85 ( 76 ) n E = 1 - 1 ( 1 + ⅇ - 1.25 ⁢ ( E sigrel - 2 ) ) ( 77 ) n pv = { 0.5 - 12.5 ⁢ ( p var - 0.02 p var < 0.02 10 ⁢ ( 0.07 - p var ) p var < 0.07 1 p var ≥ 0.07 ⁢ ⁢ n ρ = { 1 - 1 ( 1 + ⅇ - 5 ⁢ ( ρ 1 - 0.85 ) ) ρ 1 ≤ 0.85 1 - 1 ( 1 + ⅇ - 13 ⁢ ( γ avg - 0.72 ) ) ρ 1 > 0.85 ( 78 ) The voicing measure of the previous frame ν_(prev) determines the weighted sum of the transformed parameters which results in the voicing measure: v = { 0.35 ⁢ n pg + 0.225 ⁢ n pw + 0.15 ⁢ n + v prev < 0.3 0.085 ⁢ n E + 0.07 ⁢ n pv + 0.12 ⁢ n ρ 0.35 ⁢ n pg + 0.2 ⁢ n pw + 0.1 ⁢ n + v prev ≥ 0.3 . 0.1 ⁢ n E + 0.05 ⁢ n ρ ( 79 )

The weights used in the above sum are in accordence with the degree of correlation of the parameter to the voicing of the signal. Thus, the pitch gain receives the highest weight since it is most strongly correlated, followed by the PW correlation. The 1^(st) reflection coefficient and low-band nonstationarity measure receive moderate weights. The weights also depend on whether the previous frame was strongly voiced, in which case more weight is given to the low-band nonstationarity measure. The pitch variation and relative signal power receive smaller weights since they are only moderately correlated to voicing.

If the resulting voicing measure ν is clearly in the voiced region (ν<0.45) or clearly in the unvoiced region (ν>0.6), it is not modified further. However, if it lies outside the clearly voiced or unvoiced regions, the parameters are examined to determined if there is a moderate bias towards a voiced frame. In such a case, the voicing measure is modified so that its value lies in the voiced region.

The resulting voicing measure ν takes on values in the range 0–1, with lower values for more voiced signals. In addition, a binary voicing measure flag is derived from the voicing measure as follows: $\begin{matrix} {v_{flag} = \left\{ \begin{matrix} 0 & {{v \leq 0.45},} \\ 1 & {v > {0.45.}} \end{matrix} \right.} & (80) \end{matrix}$

Thus, ν_(flag) is 0 for voiced signals and 1 for unvoiced signals. This flag is used in selecting the quantization mode for PW magnitude and the subband nonstationarity vector. The voicing measure ν is concatenated to the subband nonstationarity measure vector and the resulting 6-dimensional vector is vector quantized.

The subband nonstationarity measure can have occasional spurious large values, mainly due to the approximations and the averaging used during its computation. If this occurs during voiced frames, the signal is reproduced with excessive roughness and the voice quality is degraded. To prevent this, large values of the nonstationarity measure are attenuated. The attenuation characteristic has been determined experimentally and is specified as follows for each of the five subbands: $\begin{matrix} \left. {(1)}\Leftarrow\left\{ \begin{matrix} {(1)} & {v > {0.6\mspace{14mu}{or}\mspace{14mu}(1)} \leq {0.3 + {0.1667v}}} \\ {0.05 + {0.1667v} + \frac{0.5}{\left( {1 + {\mathbb{e}}^{{- 5}{({{(1)} - {0\mspace{11mu} 3} - {0.1667v}})}}} \right)}} & {v \leq {0.6\mspace{14mu}{and}\mspace{14mu}(1)} > {0.3 + {0.1667v}}} \end{matrix} \right. \right. & (81) \\ \left. {(2)}\Leftarrow\left\{ \begin{matrix} {(2)} & {v > {0.6\mspace{14mu}{or}\mspace{14mu}(2)} \leq {0.45 + {0.1667v}}} \\ {0.02 + {0.0833v} + \frac{0.5 + {0.1667v}}{\left( {1 + {\mathbb{e}}^{{- 5}{({{(2)} - {0\mspace{11mu} 45} - {0\mspace{11mu} 1667v}})}}} \right)}} & {v \leq {0.6\mspace{14mu}{and}\mspace{14mu}(2)} > {0.45 + {0.1667v}}} \end{matrix} \right. \right. & (82) \\ \left. {(3)}\Leftarrow\left\{ \begin{matrix} {(3)} & {v > {0.6\mspace{14mu}{or}\mspace{14mu}(3)} \leq {0.5 + {0.5v}}} \\ {0.1 + {0.5v} + \frac{0.7 + {0.5v}}{\left( {1 + {\mathbb{e}}^{{- 5}{({{(3)} - 0.5 - {0\mspace{11mu} 5v}})}}} \right)}} & {v \leq {0.6\mspace{14mu}{and}\mspace{14mu}(3)} > {0.5 + {0.5v}}} \end{matrix} \right. \right. & (83) \\ \left. {(4)}\Leftarrow\left\{ \begin{matrix} {(4)} & {v > {0.6\mspace{14mu}{or}\mspace{14mu}(4)} \leq {0.65 + {0.5833v}}} \\ {0.02 + {0.0833v} + \frac{0.5 + {0.1667v}}{\left( {1 + {\mathbb{e}}^{{- 5}{({{(4)} - 0.3 - {0.3333v}})}}} \right)}} & {v \leq {0.6\mspace{14mu}{and}\mspace{14mu}(4)} > {0.65 + {0.5833v}}} \end{matrix} \right. \right. & (84) \\ \left. {(5)}\Leftarrow\left\{ \begin{matrix} {(5)} & {v > {0.6\mspace{14mu}{or}\mspace{14mu}(5)} \leq {0.65 + {0.5833v}}} \\ {0.3 + {0.3333v} + \frac{0.7 + {0.5v}}{\left( {1 + {\mathbb{e}}^{{- 5}{({{(5)} - 0.3 - {0.3333v}})}}} \right)}} & {v \leq {0.6\mspace{14mu}{and}\mspace{14mu}(5)} > {0.65 + {0.5833v}}} \end{matrix} \right. \right. & (85) \end{matrix}$

Additionaly, for voiced frames, it is necessary to ensure that the values of the nonstationarity measure in the low frequency subbands are in a monotonically nondecreasing order. This condition is enforced for the 3 lower subbands according to the flow chart in FIG. 6.

FIG. 6 is a flow chart depicting a method 600 for enforcing monotonic measures in accordance with an embodiment of the present invention. The method 600 occurs in compute subband nonstationary measure module 116 and is initiated at step 602 where the adjustment for the R vector is begun. The method 600 then proceeds to step 604.

At step 604 a determination is made as to whether the voicing measure is less than 0.6. If the determination is answered negatively, the method proceeds to step 622. If the determination is answered affirmatively the method proceeds to step 606.

At step 606 a determination is made as to whether R1 is greater than R2. If the determination is answered negatively, the method proceeds to step 614. If the determination is answered affirmatively, the method proceeds to step 608.

At step 614 a determination is made as to whether R2 is greater than R3. If the determination is answered negatively the method proceeds to step 622. If the determination is answered affirmatively, the method proceeds to step 616.

At step 608 a determination is made as to whether 0.5(R1+R2) is less than or equal to R3. If the determination is answered affirmatively the method proceeds to step 610 where a formula is used to calculate R1 and R2. The method then proceeds to step 614.

If the determination at step 608 is answered negatively, the method proceeds to step 612 where a series of calculations is used to calculate R1, R2 and R3. The method then proceeds to step 614.

At step 616 a determination is made as to whether 0.5(R2+R3) is greater than or equal to R1. If the determination is answered affirmatively, the method proceeds to step 618 where a series of calculations is used to calculate R2 and R3. If the method is answered negatively, the method proceeds to step 620 where a series of calculations is used to calculate R1, R2 and R3.

The steps 614, 618 and 620 proceed to step 622 where the adjustment of the R vector ends.

The nonstationarity measure vector is vector quantized using a spectrally weighted quantization. The spectral weights are derived from the LPC parameters. First, the LPC spectral estimate corresponding to the end point of the current frame is estimated at the pitch harmonic frequencies. This estimate employs tilt correction and a slight degree of bandwidth broadening. These measures are needed to ensure that the quantization of formant valleys or high frequencies are not compromised by attaching excessive weight to formant regions or low frequencies. $\begin{matrix} {{W_{8}(k)} = {{\frac{{\sum\limits_{\;{m = 0}}^{10}{{a_{8}^{\prime}(i)}0.4^{m}{\mathbb{e}}^{{- j}\; w_{8}{k8}}}}}{{{\sum\limits_{\;{m = 0}}^{10}{{a_{8}^{\prime}(i)}0.98^{m}{\mathbb{e}}^{{- j}\; w_{8}{k8}}}}}^{2}}\mspace{31mu} 0} \leq k \leq {K_{8}.}}} & (86) \end{matrix}$

This harmonic spectrum is converted to a subband spectrum by averaging across the 5 subbands used for the computation of the nonstationarity measure. $\begin{matrix} {{{\overset{\_}{W}}_{8}(l)} = {{\frac{1}{\left( {{\eta_{8}(l)} - {\eta_{8}\left( {l - 1} \right)}} \right)}{\sum\limits_{k = {\eta_{8}{({l - 1})}}}^{{\eta_{8}{(l)}} - 1}{{W_{8}(k)}\mspace{31mu} 1}}} \leq l \leq 5.}} & (87) \end{matrix}$

This is averaged with the subband spectrum at the end of the previous frame to derive a subband spectrum that corresponding to the center of the current frame. This average serves as the spectral weight vector for the quantization of the nonstationarity vector. {overscore (W)} ₄(l)=0.5({overscore (W)} ₀(l)+{overscore (W)} ₈(l)) 1≦l≦5.  (88)

The voicing measure is concatenated to the end of the nonstationarity measure vector, resulting in a 6-dimensional composite vector. This permits the exploitation of the considerable correlation that exists between these quantities. The composite vector is denoted by

_(c)={

(1)

(2)

(3)

(4)

(5) ν}.  (89)

The spectral weight for the voicing measure is derived from the spectral weight for the nonstationarity measure depending on the voicing measure flag. If the frame is voiced (ν_(flag)=0), the weight is computed as $\begin{matrix} {{{\overset{\_}{W}}_{4}(6)} = {{\frac{0.33}{5}{\sum\limits_{l = 1}^{5}{{W_{4}(l)}\mspace{31mu} v_{flag}}}} = 0.}} & (90) \end{matrix}$

In other words, it is lower than the average weight for the nonstationary component. This ensures that that the nonstationary component is quantized more accurately than the voicing measure. This is desirable since for voiced frames, it is important to preserve the nonstationarity in the various bands to achieve the right degree of periodicity. On the other hand, for unvoiced frames, voicing measure is more important. In this case, its weight is larger than the maximum weight for the nonstationary component. $\begin{matrix} {{{\overset{\_}{W}}_{4}(6)} = {{1.5\;\underset{1 \leq l \leq 5}{MAX}\;{W_{4}(l)}v_{flag}} = 1.}} & (91) \end{matrix}$

A 64 level, 6-dimensional vector quantizer is used to quantize the composite nonstationarity measure-voicing measure vector. The first 8 codevectors (indices 0–7) assigned to represent unvoiced frames and the remaining 56 codevectors (indices 8–63) are assigned to represent voiced frames. The voiced/unvoiced decision is made based on the voicing measure flag. The following weighted MSE distortion measure is used: D R ⁡( l ) = ∑ m = 1 6 ⁢ W _ 4 ⁡ ( m ) ⁡ [ c ⁢ ( m ) - V R ⁡ ( l , m ) ] 2 ⁢ ⁢ 0 ≤ l ≤ 63 , ( 92 )

Here, {V_(R)(l,m), 0≦l≦63, 1≦m≦6} is the 64 level, 6-dimensional composite nonstationarity measure-voicing measure codebook and D_(R)(l) is the weighted MSE distortion for the l^(th) codevector. If the frame is unvoiced (ν_(flag)=1), this distortion is minimized over the indices 0–7. If the frame is voiced (ν_(flag)=0), the distortion is minimized over the indices 8–63. Thus, $\begin{matrix} {D_{R}^{\min} = \left\{ \begin{matrix} {\underset{0 \leq l \leq 7}{MIN}{D_{R}(l)}} & {v_{flag} = 1} \\ {\underset{8 \leq l \leq 63}{MIN}{D_{R}(l)}} & {v_{flag} = 0} \end{matrix} \right.} & (93) \end{matrix}$

This partitioning of the codebook reflects the higher importance given to the representation of the nonstationarity measure during voiced frames. The 6-bit index of the optimal codevector l*_(R) is transmitted to the decoder as the nonstationarity measure index. It should be noted that the voicing measure flag, which is used in the decoder 100B for the inverse quantization of the PW magnitude vector, can be detected by examining the value of this index.

Up to this point, the PW vectors are processed in Cartesian (i.e., real-imaginary) form. The FDI codec 100 at 4.0 kbit/s encodes only the PW magnitude information to make the most efficient use of available bits. PW phase spectra are not encoded explicitly. Further, in order to avoid the computation intensive square-root operation in computing the magnitude of a complex number, the PW magnitude-squared vector is used during the quantization process.

The PW magnitude vector is quantized using a hierarchical approach, which allows the use of fixed dimension VQ with a moderate number of levels and precise quantization of perceptually important components of the magnitude spectrum. In this approach, the PW magnitude is viewed as the sum of two components: a PW mean component, which is obtained by averaging the PW magnitude across frequencies within a 7 band sub-band structure, and a PW deviation component, which is the difference between the PW magnitude and the PW mean. The PW mean component captures the average level of the PW magnitude across frequency, which is important to preserve during encoding. The PW deviation contains the finer structure of the PW magnitude spectrum and is not important at all frequencies. It is only necessary to preserve the PW deviation at a small set of perceptually important frequencies. The remaining elements of PW deviation can be discarded, leading to a small, fixed dimensionality of the PW deviation component.

The PW magnitude vector is quantized differently for voiced and unvoiced frames as determined by the voicing measure flag. Since the quantization index of the nonstationarity measure is determined by the voicing measure flag, the PW magnitude quantization mode inforamtion is conveyed witout any additional overhead.

During voiced frames, the spectral characteristics of the residual are relatively stationary. since the PW mean component is almost constant across the frame, it is adequate to transmit it once per frame. The PW deviation is transmitted twice per frame, at the 4^(th) and 8^(th) subframes. Further, interframe predictive quantization can be used in the voiced mode. On the other hand, unvoiced frames tend to be nonstationary. To track the variations in PW spectra, both mean and deviation components are transmitted twice per frame, at the 4^(th) and 8^(th) subframes. Prediction is not employed in the unvoiced mode.

The PW magnitude vectors at subframes 4 and 8 are smoothed by a 3-point window. This smoothing can be viewed as an approximate form of decimation filtering to down sample the PW vector from 8 vectors/frame to 2 vectors/frame. {overscore (P)} _(m)(k)=0.3P _(m−1)(k)+0.4P _(m)(k)+0.3P _(m+1)(k), 0≦k≦K _(m) , m=4,8.  (94)

The subband mean vector is computed by averaging the PW magnitude vector across 7 subbands. The subband edges in Hz are B _(pw)=[1 400 800 1200 1600 2000 2600 3400].  (95)

To average the PW vector across frequencies, it is necessary to translate the subband edges in Hz to subband edges in terms of harmonic indices. The band-edges in terms of harmonic indices for subframes 4 and 8 can be computed by $\begin{matrix} {{{\kappa_{m}(i)} = \begin{Bmatrix} {2 + \left\lfloor \frac{{B_{pw}(i)}K_{m}}{4000} \right\rfloor} & {{\left\{ {1 + \left\lfloor \frac{{B_{pw}(i)}K_{m}}{4000} \right\rfloor} \right\} < \frac{{B_{pw}(i)}\pi}{4000\omega_{m}}},} \\ \left\lfloor \frac{{B_{pw}(i)}K_{m}}{4000} \right\rfloor & {{\left\lfloor \frac{{B_{pw}(i)}K_{m}}{4000} \right\rfloor > \frac{{B_{pw}(i)}\pi}{4000\omega_{m}}},} \\ {1 + \left\lfloor \frac{{B_{pw}(i)}K_{m}}{4000} \right\rfloor} & {{otherwise}.} \end{Bmatrix}},{0 \leq i \leq 7},{m = 4},8.} & (96) \end{matrix}$

The mean vectors are computed at subframes 4 and 8 by averaging over the harmonic indices of each subband. It should be noted that, as mentioned earlier, since the PW vector is available in magnitude-squared form, the mean vector is in reality a RMS vector. This is reflected by the following equation. $\begin{matrix} {{{{\overset{\_}{P}}_{m}(i)} = \sqrt{\frac{1}{{\kappa_{m}\left( {i + 1} \right)} - {\kappa_{m}(i)}}{\sum\limits_{k = {\kappa_{m}{(i)}}}^{{\kappa_{m}{({i + 1})}} - 1}{{P_{m}(k)}}^{2}}}},{0 \leq i \leq 6},{m = 4},8.} & (97) \end{matrix}$

The mean vector quantization is spectrally weighted. The spectral weight vector is computed for subframe 8 from LP parameters as follows: $\begin{matrix} {{W_{8}(k)} = \frac{\sum\limits_{l = 0}^{10}{{a_{l}^{\prime}(8)}(0.4)^{l}{\mathbb{e}}^{{- {j\omega}_{8}}{kl}}}}{\sum\limits_{l = 0}^{10}{{a_{l}^{\prime}(8)}(0.98)^{l}{\mathbb{e}}^{{- {j\omega}_{8}}{kl}}}}} & (98) \end{matrix}$

The spectral weight vector is attenuated outside the band of interest, so that out-of-band PW components do not influence the selection of the optimal codevector. W ₈(k)

W ₈(k)10⁻¹⁰, 0≦k<κ ₈(0) or κ₈(7)≦k≦K ₈.  (99)

The spectral weight vector for subframe 4 is approximated as an average of the spectral weight vectors of subframes 0 and 8. This approximation is used to reduce computational complexity of the encoder. W ₄(k)=0.5(W ₀(k)+W ₈(k)), 0≦k≦K ₄.  (100)

The spectral weight vectors at subframes 4 and 8 are averaged over subbands to serve as spectral weights for quantizing the subband mean vectors: $\begin{matrix} {{{{\overset{\_}{W}}_{m}(i)} = {\frac{1}{{\kappa_{m}\left( {i + 1} \right)} - {\kappa_{m}(i)}}{\sum\limits_{k = {\kappa_{m}{(i)}}}^{{\kappa_{m}{({i + 1})}} - 1}{W_{m}(k)}}}},{0 \leq (i) \leq 6},{m = 4},8.} & (101) \end{matrix}$

The mean vectors at subframes 4 and 8 are vector quantized using a 7 bit codebook. A precomputed DC vector {P_(DC) _(—) _(UV)(i),0≦i≦6} is subtracted from the mean vectors prior to quantization. The resulting vectors are matched against the codebook using a spectrally weighted MSE distortion measure. The distortion measure is computed as $\begin{matrix} {{{D_{PWM\_ UV}\left( {m,l} \right)} = {\sum\limits_{i = 0}^{6}{{{\overset{\_}{W}}_{m}(i)}\left\lbrack {{V_{PWM\_ UV}\left( {l,i} \right)} - \left( {{{\overset{\_}{P}}_{m}(i)} - {P_{DC\_ UV}(i)}} \right)} \right\rbrack}^{2}}}{{0 \leq l \leq 12},{m = 4},8.}} & (102) \end{matrix}$ Here, {V_(PWM) _(—) _(UV)(l,i),0≦l≦127,0≦i≦6} is the 7-dimensional, 128 level unvoiced mean codebook. Let l*_(PWM) _(—) _(UV) _(—) ₄ and l*_(PWM) _(—) _(UV) _(—) ₈ be the codebook indices that minimize the above distortion for subframes 4 and 8 respectively, i.e., $\begin{matrix} {{{D_{PWM\_ UV}\left( {m,l_{{PWM\_ UV}{\_ m}}^{*}} \right)} = {\underset{0 \leq l \leq 127}{MIN}{D_{PWM\_ UV}\left( {m,l} \right)}}},{m = 4},8.} & (103) \end{matrix}$ The quantized subband mean vectors are given by adding the optimal codevectors to the DC vector: {overscore (P)} _(mq)(i)=P _(DC) _(—) _(UV)(i)+V _(PWM) _(—) _(UV)(l* _(PWM) _(—) _(UV) _(—) _(m) ,i) 0≦i≦6, m=4,8.  (104)

The quantized subband mean vectors are used to derive the PW deviations vectors. This makes it possible to compensate for the quantization error in the mean vectors during the quantization of the deviations vectors. Deviations vectors are computed for subframes 4 and 8 by subtracting fullband vectors constructed using quantized mean vectors from original PW magnitude vectors. The fullband vectors are obtained by piecewise-constant approximation across each subband: $\begin{matrix} {{S_{m}(k)} = \left\{ \begin{matrix} 0 & {{k < {\kappa_{m}(i)}},{m = 4},8,} \\ {{{\overset{\_}{P}}_{mq}(i)},} & {{{k_{m}(i)} \leq k < {\kappa_{m}\left( {i + 1} \right)}},{0 \leq i \leq 6},{m = 4},8,} \\ 0 & {{{\kappa_{m}(7)} \leq k \leq K_{m}},{m = 4},8.} \end{matrix} \right.} & (105) \end{matrix}$

The deviation vector is quantized only for a small subset of the harmonics, which are perceptually important. There are a number of approaches to selecting the harmonics, by taking into account the signal characteristics, spectral energy distribution etc. This embodiment of the present invention uses a simple approach where harmonics 1–10 are selected. This ensures that the low frequency part of the speech spectrum, which is perceptually important is reproduced more accurately. Taking into account the fact that the PW vector is available in magnitude-squared form, harmonics 1–10 of the deviation vector are computed as follows: F _(m)(k)=√{square root over (P _(m)(kstart_(m) +k))}−S _(m)(kstart_(m) +k), 1≦k≦10, m=4,8.  (106)

Here, kstart_(m) is computed so that harmonics below 200 Hz are not selected for computing the deviations vector: $\begin{matrix} {{kstart}_{m} = \left\{ \begin{matrix} \begin{matrix} {0,} & {{K_{m} < 20},} \\ {1,} & {{20 \leq K_{m} < 40},} \\ {2,} & {40 \leq {K_{m}.}} \end{matrix} & {{m = 4},8.} \end{matrix} \right.} & (107) \end{matrix}$

The quantization of deviations vectors is carried out by a 6-bit vector quantizer using spectrally weighted MSE distortion measure. $\begin{matrix} {{{D_{PWD\_ UV}\left( {m,l} \right)} = {\sum\limits_{k = 1}^{10}\;{{W_{m}\left( {k + {kstart}_{m}} \right)}\left\lbrack {{V_{PWD\_ UV}\left( {l,k} \right)} - {F_{m}(k)}} \right\rbrack}^{2}}}{{0 \leq l \leq 63},{m = 4},8.}} & (108) \end{matrix}$

Here, {V_(PWD) _(—) _(UV)(l,k),0≦l≦63,1≦k≦10} is the 10-dimensional, 63 level unvoiced deviations codebook. Let l*_(PWD) _(—) _(UV) _(—) ₄ and l*_(PWD) _(—) _(UV) _(—) ₈ be the codebook indices that minimize the above distortion for subframes 4 and 8 respectively, i.e., $\begin{matrix} {{{D_{PWM\_ UV}\left( {m,l_{{PWM\_ UV}{\_ m}}^{*}} \right)} = {\underset{0 \leq l \leq 63}{MIN}{D_{PWD\_ UV}\left( {m,l} \right)}}},{m = 4},8.} & (109) \end{matrix}$

The quantized deviations vectors are the optimal code-vectors: F _(mq)(i)=V _(PWD) _(—) _(UV)(l* _(PWD) _(—) _(UV) _(—) _(m) ,k) 1≦k≦10, m=4,8.  (110)

The two 7-bit mean quantization indices l*_(PWM) _(—) _(UV) _(—) ₄, l*_(PWM) _(—) _(UV) _(—) ₈ and the two 6-bit deviation indices l*_(PWD) _(—) _(UV) _(—) ₄, l*_(PWD) _(—) _(UV) _(—) ₈ represent the PW magnitude information for unvoiced frames usng a total of 26 bits. In addition, a single bit is used to represent the binary VAD flag during unvoiced frames only.

In the voiced mode, the PW magnitude vector smoothing, the computation of harmonic subband edges and the PW subband mean vector at subframe 8 take place as in the case of unvoiced frames. In contrast to the unvoiced case, a predictive VQ approach is used where the quantized PW subband mean vector at subframe 0 (i.e., subframe 8 of previous frame) is used to predict the PW subband mean vector at subframe 8. A prediction coefficient of 0.5 is used. A predetermined DC vector is subtracted prior to prediction. The resulting vectors are quantized by a 7-bit codebook using a spectrally weighted MSE distortion measure. The subband spectral weight vector is computed for subframe 8 as in the case of unvoiced frames. The distortion computation is summarized by $\begin{matrix} {{D_{PWM\_ V}(l)} = {\sum\limits_{\;{i = 0}}^{6}{{{\overset{\_}{W}}_{8}(i)}\left\lbrack {{{V_{PWM\_ V}\left( {l,i} \right)} - {\left. \quad{\left( {{{\overset{\_}{P}}_{8}(i)} - {P_{DC\_ V}(i)}} \right) + {0.5\left( {{{\overset{\_}{P}}_{0q}(i)} - {P_{DC\_ V}(i)}} \right)}} \right\rbrack^{2}\mspace{31mu} 0}} \leq l \leq 127.} \right.}}} & (111) \end{matrix}$

Here, {V_(PWM) _(—) _(V)(l,i),0≦l≦127,0≦i≦6} is the 7-dimensional, 128 level voiced mean codebook, {P_(DC) _(—) _(V)(i),0≦i≦6} is the voiced DC vector. {{overscore (P)}_(0q)(i),0≦i≦6} is the predictor state vector which is same as the quantized PW subband mean vector at subframe 8 (i.e., {{overscore (P)}_(8q)(i),0≦i≦6}) of the previous frame where l*_(PWM) _(—) _(V) is the codebook index that minimizes the above distortion, i.e., $\begin{matrix} {{D_{PWM\_ V}\left( l_{PWM\_ V}^{*} \right)} = {\underset{0 \leq l \leq 127}{MIN}{{D_{PWM\_ V}(l)}.}}} & (112) \end{matrix}$

The quantized subband mean vector at subframe 8 is given by adding the optimal code-vector to the predicted vector and the DC vector: {overscore (P)} _(8q)(i)=MAX(0.1,P _(DC) _(—) _(V)(i)+0.5({overscore (P)} _(0q)(i)−P _(DC) _(—) _(V)(i))+V _(PWM) _(—) _(V)(l* _(PWM) _(—) _(V) ,i)) 0≦i≦6.  (113)

Since the mean vector is an average of PW magnitudes, it should be a nonnegative value. This is enforced by the maximization operation in the above equation 113.

A fullband mean vector {S₈(k),0≦k≦K₈} is constructed at subframe 8 using the quantized subband mean vector, as in the unvoiced mode. A subband mean vector is constructed for subframe 4 by linearly interpolating between the quantized subband mean vectors of subframes 0 and 8: {overscore (P)} ₄(i)=0.5({overscore (P)} _(0q)(i)+{overscore (P)} _(8q)(i)) 0≦i≦6.  (114)

A fullband mean vector {S₄(k),0≦k≦K₄} is constructed at subframe 4 using this interpolated subband mean vector. By subtracting these fullband mean vectors from the corresponding magnitude vectors, deviations vectors {F₄(k),1≦k≦10} and {F₈(k),1≦k≦10} are computed at subframes 4 and 8. Note that these deviations vectors are computed only for selected harmonics, i.e., harmonics (kstart_(m)+1)−(kstart_(m)+10) as in the unvoiced case. The deviations vectors are predictively quantized based on prediction from the quantized deviation vector from 4 subframes ago i.e, subframe 4 is predicted using subframe 0, subframe 8 using subframe 4. A prediction coefficient of 0.55 is preferably used.

The deviations prediction error vectors are quantized using a multi-stage vector quantizer with 2 stages. The 1^(st) stage uses a 64-level codebook and the 2^(nd) stage uses a 16-level codebook. Another embodiment of the present invention considers only the 8 best candidates from the 1^(st) codebook in searching the 2^(nd) codebook which is used to reduce complexity. The distortion measures are spectrally weighted. The spectral weight vectors {W₄(k),0≦k<10}, and {W₈(k),0≦k<10} computed as in the unvoiced case. The 1^(st) codebook uses the following distortion to find the 8 codevectors with the smallest distortion: $\begin{matrix} {{D_{PWD\_ V1}\left( {m,l} \right)} = {\sum\limits_{\;{k = 1}}^{10}{{W_{m}\left( {k + {kstart}_{m}} \right)}\left\lbrack {{{{V_{PWD\_ V1}\left( {l,k} \right)} - {\left. \quad{{F_{m}(k)} + {0.55{F_{{({m - 4})}q}(k)}}} \right\rbrack^{2}\mspace{31mu} 0}} \leq l \leq 63},{m =}} \right.}}} & (115) \end{matrix}$ where {j_(PWD) _(—) _(V) _(—) _(m)(i),0≦i≦7} is the 8 indices associated with the 8 best codewords. The entire 2^(nd) codebook is searched for each of the 8 codevectors from the 1^(st) codebook, so as to minimize the distortion between the input vector and the sum of the 1^(st) and 2^(nd) codebook vectors: $\begin{matrix} {\underset{\underset{0 \leq l_{2} \leq 15}{l_{1} \in j_{{PWD\_ V}{\_ m}}}}{MIN}{D_{PWD\_ V}\left( {m,l} \right)}\underset{k = 1}{\overset{10}{= \sum}}{{W_{m}(k)}\left\lbrack {{V_{PWD\_ V1}\left( {l_{1},k} \right)} + \left. \quad{{V_{PWD\_ V2}\left( {l_{2},k} \right)} - {F_{m}(k)} + {0.55{F_{{({m - 4})}q}(k)}}} \right\rbrack^{2}} \right.}} & (116) \end{matrix}$ where l₁=l*_(PWD) _(—) _(V1) _(—) ₄ and l₂=l*_(PWD) _(—) _(V2) _(—) ₄ minimize the above distortion for subframe 4 and l₁=l*_(PWD) _(—) _(V1) _(—) ₈ and l₂=l*_(PWD) _(—) _(V2) _(—) ₈ minimize the above distortion for subframe 8. Then, the 7-bit mean quantization index l*_(PWM) _(—) _(V), the 6-bit index l*_(PWD) _(—) _(V1) _(—) ₄, the 4-bit index l*_(PWD) _(—) _(V1) _(—) ₄, the 6-bit index l*_(PWD) _(—) _(V1) _(—) ₈ and the 4-bit index l*_(PWD) _(—) _(V1) _(—) ₈ together represent the 27 bits of PW magnitude information for voiced frames. It should be noted that voiced frames are implicitly assumed to be active which removes the need for transmitting the VAD flag.

In the unvoiced mode, the VAD flag is explicitly encoded using a binary index l*_(VAD) _(—) _(UV): l* _(VAD) _(—) _(UV)=VAD_FLAG.  (117)

In the voiced mode, it is implicitly assumed that the frame is active speech. Consequently, it is not necessary to explicitly encode the VAD information.

In a preferred embodiment, at 4 kb/s, the following table 1 summarizes the bits allocated to the quantization of the encoder parameters under voiced and unvoiced modes. As indicated in the table, a single parity bit is included as part of the 80 bit compressed speech packet. This bit is intended to detect channel errors in a set of 24 critical (Class 1) bits. Class 1 bits consist of the 6 most significant bits (MSB) of the PW gain bits, 3 MSBs of 1^(st) LSF, 3 MSBs of 2^(nd) LSF, 3 MSBs of 3^(rd) LSF, 2 MSBs of 4^(th) LSF, 2 MSBs of 5^(th) LSF, MSB of 6^(th) LSF, 3 MSBs of the pitch index and MSB of the nonstationarity measure index. The single parity bit is obtained by an exclusive OR operation of the Class 1 bit sequence. It will be appreciated by those skilled in the art that other bit allocations can be used and still fall within the scope of the present invention.

TABLE 1 Voiced Mode Unvoiced Mode Pitch 7 7 LSF Parameters 31 31 PW Gain 8 8 Nonstationarity & voicing Measure 6 6 PW Magnitude Mean 7 14 Deviations 20 12 VAD Flag 0 1 Parity Bit 1 1 Total/20 ms Frame 80 80

The present invention will now be discussed with reference to decoder 100B. The decoder receives the 80 bit packet of compressed speech produced by the encoder and reconstructs a 20 ms segment of speech. The received bits are unpacked to obtain quantization indices for the LSF parameter vector, the pitch period, the PW gain vector, the nonstationarity measure vector and the PW magnitude vector. A cyclic redundancy check (CRC) flag is set if the frame is marked as a bad frame. For example this could be due to frame erasures or if the parity bit which is part of the 80 bit compressed speech packet is not consistent with the class 1 bits comprising the gain, LSF, pitch and nonstationarity measure bits. Otherwise, the CRC flag is cleared. If the CRC flag is set, the received information is discarded and bad frame masking techniques are employed to approximate the missing information.

Based on the quantization indices, LSF parameters, pitch, PW gain vector, nonstationarity measure vector and the PW magnitude vector are decoded. The LSF vector is converted to LPC parameters and linearly interpolated for each subframe. The pitch frequency is interpolated linearly for each sample. The decoded PW gain vector is linearly interpolated for odd indexed subframes. The PW magnitude vector is reconstructed depending on the voicing measure flag, obtained from the nonstationarity measure index. The PW magnitude vector is interpolated linearly across the frame at each subframe. For unvoiced frames (voicing measure flag=1), the VAD flag corresponding to the look-ahead frame is decoded from the PW magnitude index. For voiced frames, the VAD flag is set to 1 to represent active speech.

Based on the voicing measure and the nonstationarity measure, a phase model is used to derive a PW phase vector for each subframe. The interpolated PW magnitude vector at each subframe is combined with a phase vector from the phase model to obtain a complex PW vector for each subframe.

Out-of-band components of the PW vector are attenuated. The level of the PW vector is restored to the RMS value represented by the PW gain vector. The PW vector, which is a frequency domain representation of the pitch cycle waveform of the residual, is transformed to the time domain by an interpolative sample-by-sample pitch cycle inverse DFT operation. The resulting signal is the excitation that drives the LP synthesis filter, constructed using the interpolated LP parameters. Prior to synthesis, the LP parameters are bandwidth broadened to eliminate sharp spectral resonances during background noise conditions. The excitation signal is filtered by the all-pole LP synthesis filter to produce reconstructed speech. Adaptive postfiltering with tilt correction is used to mask coding noise and improve the peceptual quality of speech.

The pitch period is inverse quantized by a simple table lookup operation using the pitch index. It is converted to the radian pitch frequency corresponding to the right edge of the frame by $\begin{matrix} {{\hat{\omega}(160)} = {\frac{2\pi}{\hat{p}}.}} & (118) \end{matrix}$ where {circumflex over (p)} is the decoded pitch period. A sample by sample pitch frequency contour is created by interpolating between the pitch frequency of the left edge {circumflex over (ω)}(0) and the pitch frequency of the right edge {circumflex over (ω)}(160): $\begin{matrix} {{{\hat{\omega}(n)} = \frac{{\left( {160 - n} \right){\hat{\omega}(0)}} + {n\;{\hat{\omega}(160)}}}{160}},\mspace{31mu}{0 \leq n \leq 160.}} & (119) \end{matrix}$

If there are abrupt discontinuities between the left edge and the right edge pitch frequencies, the above interpolation is modified as in the case of the encoder. Note that the left edge pitch frequency {circumflex over (ω)}(0) is the right edge pitch frequency of the previous frame.

The index of the highest pitch harmonic within the 4000 Hz band is computed for each subframe by $\begin{matrix} {{{\hat{K}}_{m} = \left\lfloor \frac{\pi}{\hat{\omega}\left( {20m} \right)} \right\rfloor},\mspace{31mu}{1 \leq m \leq 8.}} & (120) \end{matrix}$

The LSFs are quantized by a hybrid scalar-vector quantization scheme. The first 6 LSFs are scalar quantized using a combination of intraframe and interframe prediction using 4 bits/LSF. The last 4 LSFs are vector quantized using 7 bits.

The inverse quantization of the first 6 LSFs can be described by the following equations: ${\hat{\lambda}(m)} = \left\{ \begin{matrix} {{{S_{L,m}\left( l_{{L\_ S}{\_ m}}^{*} \right)} + {0.375{{\hat{\lambda}}_{prev}\left( {m + 1} \right)}}},} & {m = 0} \\ {{{S_{L,m}\left( l_{{L\_ S}{\_ m}}^{*} \right)} + {0.375\left( {{{\hat{\lambda}}_{prev}\left( {m + 1} \right)} - {{\hat{\lambda}}_{prev}\left( {m - 1} \right)}} \right)} + {\hat{\lambda}\left( {m - 1} \right)}},} & {1 \leq m <} \end{matrix} \right.$ Here, {l*_(L) _(—) _(S) _(—) _(m),0≦m<6} are the scalar quantizer indices for the first 6 LSFs, {{circumflex over (λ)}(m),0≦m<6} are the first 6 decoded LSFs of the current frame and {{circumflex over (λ)}_(prev)(m),0≦m≦10} are the decoded LSFs of the previous frame, {S_(L,m)(l),0≦m<6,0≦l≦15} are the 16 level scalar quantizer tables for the first 6 LSFs. The last 4 LSFs are inverse quantized based on the predetermined mean values λ_(dc)(m) and the received vector quantizer index for the current frame: {circumflex over (λ)}(m)=V _(L)(l* _(L) _(—) _(V) ,m−6)+λ_(dc)(m)+0.5({circumflex over (λ)}_(prev)(m)−λ_(dc)(m)), 6≦m≦9. Here, l*_(L) _(—) _(V) is the vector quantizer index for the last 4 LSFs, {{circumflex over (λ)}(m),0≦m<6} and {V_(L)(l,m),0≦l≦127,0≦m<3} is the 128 level, 4-dimensional codebook for the last 4 LSFs. The stability of the inverse quantized LSFs is checked by ensuring that the LSFs are monotonically increasing and are separated by a minimum value of preferably 0.008. If this property is not satisfied, stability is enforced by reordering the LSFs in a monotonically increasing order. If a minimum separation is not achieved, the most recent stable LSF vector from a previous frame is substituted for the unstable LSF vector.

When the received frame is inactive, the decoded LSF's are used to update an estimate for background LSF's using the following recursive relationship: λ_(bgn)(m)=0.98λ_(bgn)(m)+0.02{circumflex over (λ)}(m), 0≦m≦9.  (123)

In order to improve the performance of the codec 100 in the presence of background noise, we replace the curent decoded LSF's by an interpolated version of the inverse quantized LSF's, background noise LSF's, and a DC value of the background noise LSF's during frames that are not only active but which follow another active frame, i.e., {circumflex over (λ)}(m)=0.25{circumflex over (λ)}(m)+0.25λ_(bgn)(m)+0.5λ_(bgn,dc)(m), 0≦m≦9  (124)

For transitional frames, i.e., frames which are transitioning from active to inactive or vice-versa, the interpolation weights are altered to favor the inverse quantized LSF's, i.e., {circumflex over (λ)}(m)=0.5{circumflex over (λ)}(m)+0.25λ_(bgn)(m)+0.25λ_(bgn,dc)(m), 0≦m≦9  (125)

The inverse quantized LSFs are interpolated each subframe by linear interpolation between the current LSFs {{circumflex over (λ)}(m),0≦m≦10} and the previous LSFs {{circumflex over (λ)}_(prev)(m),0≦m≦10}. The interpolated LSFs at each subframe are converted to LP parameters {â_(m)(l),0≦m≦10,1≦l≦8}.

Inverse quantization of the PW nonstationarity measure and the voicing measure is a table lookup operation. If l*_(R) is the index of the composite nonstationarity measure and the voicing measure, the decoded nonstationarity measure is

₁(i)=V _(R)(l* _(R) ,i), 1≦i≦5.  (126) Here, {V_(R)(l,m), 0≦l≦63, 1≦m≦6} is the 64 level, 6-dimensional codebook used for the vector quantization of the composite nonstationarity measure vector. The decoded voicing measure is {circumflex over (ν)}=V _(R)(l* _(R),6).  (127)

A voicing measure flag is also created based on l*_(R) as follows: $\begin{matrix} {{\hat{v}}_{flag} = \left\{ \begin{matrix} 0 & {l_{R}^{*} > 7} \\ 1 & {l_{R}^{*} \leq 7.} \end{matrix} \right.} & (128) \end{matrix}$ This flag determines the mode of inverse quantization used for PW magnitude.

The decoded nonstationarity measure may have excessive values due to the small number of bits used in encoding this vector. This leads to excessive roughness during highly periodic frames, which is undesirable. To control this problem, during sustained intervals of highly periodic frames the decoded nonstationarity measure is subjected to upper limits, determined based on the decoded voicing measure. If l*_(R) _(—) _(prev) denotes the nonstationarity measure index received for the preceding frame, these rules can be expressed as follows: 2 ⁢ ( 0 ) = ⁢ { MIN ⁡ ( 1 ⁢ ( 0 ) , 0.05 + 0.95 1 + e - 8 ⁢ ( v ^ - 035 ) ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 0 ) otherwise . 2 ⁢ ( 1 ) = ⁢ { MIN ⁡ ( 1 ⁢ ( 1 ) , 1 1 + e - 8 ⁢ ( v ^ - 0.25 ) ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 1 ) otherwise . 2 ⁢ ( 2 ) = ⁢ { MIN ( 1 ⁢ ( 2 ) , 0.25 + 2.83333 ⁢ ( v ^ - 0.05 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 2 ) otherwise . 2 ⁢ ( 3 ) = ⁢ { MIN ( 1 ⁢ ( 3 ) , 0.45 + 2.83333 ⁢ ( v ^ - 0.05 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 3 ) otherwise . 2 ⁢ ( 4 ) = ⁢ { MIN ( 1 ⁢ ( 4 ) , 0.55 + 2.83333 ⁢ ( v ^ - 0.05 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 4 ) otherwise .

In addition, for sustained intervals of highly periodic frames, it is desirable to prevent excessive changes in the nonstationarity measure from one frame to the next. This is achieved by allowing a maximum amount of permissible change for each component of the nonstationarity measure. The changes that result in a decrease of the nonstationarity measure are not limited. Rather, the changes that increase the nonstationarity measure are limited by this procedure. If

_(prev) denotes the modified nonstationarity measure of the preceding frame, this procedure can be summarized as follows: ⁢ ( 0 ) = ⁢ { MIN ⁡ ( 2 ⁢( 0 ) , prev ⁢ ( 0 ) + 0.06 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 0 ) otherwise . ⁢ ( 1 ) = ⁢ { MIN ⁡ ( 2 ⁢ ( 1 ) , prev ⁢ ( 1 ) + 0.10 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 1 ) otherwise . ⁢ ( 2 ) = ⁢ { MIN ⁡ ( 2 ⁢ ( 2 ) , prev ⁢ ( 2 ) + 0.16 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 2 ) otherwise . ⁢ ( 3 ) = ⁢ { MIN ⁡ ( 2 ⁢ ( 3 ) , prev ⁢ ( 3 ) + 0.24 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 3 ) otherwise . ⁢ ( 4 ) = ⁢ { MIN ⁡ ( 2 ⁢ ( 4 ) , prev ⁢ ( 4 ) + 0.27 ) , l R * > 31 ⁢ ⁢ and ⁢ ⁢ l R_prev * > 31 1 ⁢ ( 4 ) otherwise . ( 134 )

The gain vector is inverse quantized by a table look-up operation. It is then linearly transformed to reverse the transformation at the encoder. If l*_(g) is the gain index, the gain values for the even indexed subframes are obtained by $\begin{matrix} {{{{\hat{g}}_{pw}\left( {2m} \right)} = \frac{90 - {V_{g}\left( {l_{g}^{*},m} \right)}}{20}},\mspace{20mu}{1 \leq m \leq 4.}} & (135) \end{matrix}$ where, {V_(g)(l,m), 0≦l≦255, 1≦m≦4} is the 256 level, 4-dimensional gain codebook.

The gain values for the odd indexed subframes are obtained by linearly interpolating between the even indexed values: ĝ _(pw)(2m−1)=0.5(ĝ _(pw)(2m−2)+ĝ _(pw)(2m)), 1≦m≦4.  (136) The gain values are now expressed in logarithmic units. They are converted to linear units by ĝ′ _(pw)(m)=10^(ĝ) ^(pw) ^((m)), 1≦m≦8.  (137) This gain vector is used to restore the level of the PW vector during the generation of the excitation signal.

Based on the decoded gain vector in the log domain, long term average gain values for inactive frames and active unvoiced frames are computed. These gain averages are useful in identifying inactive frames that were marked as active by the VAD. This can occur due to the hangover employed in the VAD or in the case of certain background noise conditions such as babble noise. By identifying such frames, it is possible to improve the performance of the codec 100 for background noise conditions.

FIG. 7 is a flowchart for a method 700 for computing gain averages in accordance with an embodiment of the present invention. The method 700 is performed at the decoder 100B prior to being processed by modules 124 and 126 and is initiated at 702 where computation of Gavg_(bg) and Gavg_(uv) begins. The method 700 then proceeds to step 704 where a determination is made as to whether rvad_flag_final and rvad_flag_DL2 equal zero and badframe flag is false is met. If the determination is negative, the method proceeds to step 712.

At step 712 a determination is made as to whether rvad_flag_final equals a one and l_(R) is less than 8 and bad frame flag equals false, if the determination is negative the method proceeds to step 720. If the determination is affirmative, the method proceeds to step 714.

At step 714 a determination is made as to whether n_(uv) is less than 50. If the determination is answered negatively then the method proceeds to step 716 where Gavg_(uv) is calculated using a first equation. If the method is answered negatively, the method proceeds to step 718 where a second equation is used to calculate Gavg_(uv).

If the determination at step 704 is negative, the method proceeds to step 706 where a determination of whether nbg is less than 50 is determined. If the determination is answered negatively, the method proceeds to step 708 where Gavg-tmp_(bg) is calculated using a first equation. If the determination is answered affirmatively, the method proceeds to step 710 where Gavg-tmp_(bg) is calculated using a second equation.

The steps 708, 710, 716, 718 and 712 proceed to step 720 where Gavg_(bg) is calculated. The method then proceeds to step 722 where the computation ends for Gavg_(bg) and Gavg_(uv).

First an average gain is computed for the entire frame: $\begin{matrix} {{\hat{g}}_{avg} = {\frac{1}{8}{\sum\limits_{m = 1}^{8}\;{{{\hat{g}}_{pw}(m)}.}}}} & (138) \end{matrix}$ Long term average gains for inactive frames which represent the background signal and unvoiced frames are computed according to the method 700.

The decoded voicing measure flag determines the mode of inverse quantization of the PW magnitude vector. If {circumflex over (ν)}_(flag) is a zero, voiced mode is used and if {circumflex over (ν)}_(flag) is a one, unvoiced mode is used.

In the voiced mode, the PW mean is transmitted once per frame and the PW deviation is transmitted twice per frame. Further, interframe predictive quantization is used in this mode. In the unvoiced mode, mean and deviation components are transmitted twice per frame. Prediction is not employed in the unvoiced mode.

In the unvoiced mode, the VAD flag is explicitly encoded using a binary index l*_(VAD) _(—) _(UV). In this mode, VAD flag is decoded by $\begin{matrix} {{RVAD\_ FLAG} = \left\{ \begin{matrix} 0 & {l_{VAD\_ UV}^{*} = 0} \\ 1 & {l_{VAD\_ UV}^{*} = 1.} \end{matrix} \right.} & (139) \end{matrix}$

In the voiced mode, it is implicitly assumed that the frame is active speech. Consequently, it is not necessary to explicitly encode the VAD information. VAD flag is set to 1 indicating active speech in the voiced mode: RVAD_FLAG=1.  (140)

It should be noted that the RVAD_FLAG is the VAD flag corresponding to the look-ahead frame where RVAD_FLAG, RVAD_FLAG_DL1, RVAD_FLAG_DL2 denote the VAD flags of the look-ahead frame, current frame and the previous frame respectively. A composite VAD value, RVAD_FLAG_FINAL, is determined for the current frame, based on the above VAD flags, according to the following table 2:

TABLE 2 RVAD_FLAG_DL2 RVAD_FLAG_DL1 RVAD_FLAG RVAD_FLAG_FINAL 0 0 0 0 0 0 1 1 0 1 0 0 0 1 1 2 1 0 0 1 1 0 1 3 1 1 0 2 1 1 1 3 The RVAD_FLAG_FINAL is zero for frames in inactive regions, three in active regions, one prior to onsets and a two prior to offsets. Isolated active frames are treated as inactive frames and vice versa.

In the unvoiced mode, the mean vectors for subframes 4 and 8 are inverse quantized as follows: {circumflex over (D)} _(m)(i)=P _(DC) _(—) _(UV)(i)+V _(PWM) _(—) _(UV)(l* _(PWM) _(—) _(UV) _(—) _(m) ,i) 0≦i≦6,m=4,8.  (141) Here, {{circumflex over (D)}₄(i),0≦i≦6} and {{circumflex over (D)}₈(i),0≦i≦6} are the inverse quantized 7-band subband PW mean vectors, {V_(PWM) _(—) _(UV)(l,i),0≦l≦127,0≦i≦6} is the 7-dimensional, 128 level unvoiced mean codebook. l*_(PWM) _(—) _(UV) _(—) ₄ and l*_(PWM) _(—) _(UV) _(—) ₈ are the indices for mean vectors for the 4^(th) and 8^(th) subframes. {P_(DC) _(—) _(UV)(i),0≦i≦6} is a predetermined DC vector for the unvocied mean vectors.

Due to the limited accuracy of PW mean quantization in the unvoiced mode, it is possible to have high values of PW mean at high frequencies. This in conjunction with a LP synthesis filter which emphasizes high frequencies can cause excessive high frequency content in the reconstructed speech, leading to poor voice quality. To control this condition, the PW mean values in the uppermost two subbands is attenuated if it is found to be high and the LP synthesis filter has a frequency response with a high frequency emphasis.

The magnitude squared frequency response of the LP synthesis filter is averaged across two bands, 0–2 kHz and 2–4 kHz: $\begin{matrix} {S_{lb} = {\sum\limits_{k = 1}^{\lfloor\frac{{\hat{K}}_{g}}{2}\rfloor}\;\frac{1}{{{\sum\limits_{m = 0}^{10}\;{{{\hat{a}}_{8}(m)}e^{{- j}{\hat{w}{(160)}}{km}}}}}^{2}}}} & (142) \\ {S_{hb} = {\sum\limits_{k = {1 + {\lfloor\frac{{\hat{K}}_{g}}{2}\rfloor}}}^{2{\lfloor\frac{{\hat{K}}_{g}}{2}\rfloor}}\;{\frac{1}{{{\sum\limits_{m = 0}^{10}\;{{{\hat{a}}_{8}(m)}e^{{- j}{\hat{w}{(160)}}{km}}}}}^{2}}.}}} & (143) \end{matrix}$ Here, {â₈(m)} are the decoded, interpolated LP parameters for the 8^(th) subframe of the current frame, ŵ(160) is the decoded pitch frequency in radians for the 160^(th) sample of the current frame and └ ┘ denotes truncation to integer. A comparison of the low band sum S_(lb) against the high band sum S_(hb) can reveal the degree of high frequency emphasis in the LP synthesis filter.

An average of the PW magnitude in the 1^(st) 5 subbands is computed, for subframes 4 and 8, as follows: $\begin{matrix} {{{\overset{\overset{\_}{\hat{}}}{D}}_{m} = {\frac{1}{5}{\sum\limits_{i = 0}^{4}\;{{\hat{D}}_{m}(i)}}}},\mspace{11mu}{m = 4},8.} & (144) \end{matrix}$ The attenuation of the PW mean in the 6^(th) and 7^(th) subbands is performed according to the flowchart 800 in FIG. 8.

FIG. 8 is a flow chart depicting a method 800 for computing the attenuation of PW mean high frequency in the unvoiced bands in accordance with an embodiment of the present invention. The method 800 is performed at the decoder 100B prior to being processed by modules 124 and 126 and is initiated at step 802 where the adjustment of PW mean high frequency bands is begun for subframes 4 and 8. The method proceeds to step 804 where a determination of whether rvad_flag_final equals zero is determined. If the determination is answered negatively, the method proceeds to step 806 where D_(m)(5) and D_(m)(6) are calculated. If the determination is answered negatively, the method proceeds to step 808.

At step 808, a determination is made as to whether S_(lb) is less than 0.0724S_(hb). If the determination is answered negatively the method proceeds to step 810 where a determination is made as to whether l*_(R) _(—) _(Prev) is less than 8 and l*_(R) is less than or equal to 5. If the determination at step 810 is answered negatively the method proceeds to step 812 where D_(m)(5) and D_(m)(6) are calculated. If the determination at step 812 is answered affirmatively, the method proceeds to step 814.

At step 814, the Gavg_(Th) is computed. The method then proceeds to step 816 where a determination is made as to whether n_(bg) is greater than or equal to 50, n_(uv) is greater than or equal to 50, and Gavg is less than Gavg_(Th). If the determination is answered negatively the method proceeds to step 812. If the determination is answered affirmatively the method proceeds to step 818.

At step 818, the slope is calculated. The method then proceeds to step 820 where G_(α), D_(m)(5) and D_(m)(6) are calculated.

If the determination at step 808 is answered affirmatively, the method proceeds to step 822 where D_(m)(5) and D_(m)(6) are calculated. The method then proceeds to step 824.

Steps 806, 822, 820 and 822 all proceed to step 824 where the adjustment for the PW mean ends for subframes 4 and 8.

The deviation vectors for subframes 4 and 8 are inverse quantized as follows: {circumflex over (F)} _(m)(k)=V _(PWD) _(—) _(UV)(l* _(PWD) _(—) _(UV) _(—) _(m) ,k), 1≦k≦10, m=4,8.  (145) Here, {{circumflex over (F)}₄(k),1≦k≦10} and {{circumflex over (F)}₈(k),1≦k≦10} are the inverse quantized PW deviation vectors. {V_(PWD) _(—) _(UV)(l,k),1≦l≦63,1≦k≦10} is the 10-dimensional, 64 level unvoiced deviations codebook. l*_(PWD) _(—) _(UV) _(—) ₄ and l*_(PWD) _(—) _(UV) _(—) ₈ are the indices for deviations vectors for the 4^(th) and 8^(th) subframes.

The subband mean vectors are converted to fullband vectors by a piecewise constant approximation across frequency. This requires that the subband edges in Hz are translated to subband edges in terms of harmonic indices. Let the band edges in Hz be defined by the array B _(pw)=[1 400 800 1200 1600 2000 2600 3400].  (146) The band edges can be computed by ${{{\hat{\kappa}}_{m}(i)} = \begin{Bmatrix} {2 + \left\lfloor \frac{{B_{pw}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} & {{\left\{ {1 + \left\lfloor \frac{{B_{pw}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} \right\} < \frac{{B_{pw}(i)}\pi}{4000{\hat{\omega}}_{m}}},} \\ \left\lfloor \frac{{B_{pw}(i)}{\hat{K}}_{m}}{4000} \right\rfloor & {{\left\lfloor \frac{{B_{pw}(i)}{\hat{K}}_{m}}{4000} \right\rfloor > \frac{{B_{pw}(i)}\pi}{4000{\hat{\omega}}_{m}}},} \\ {1 + \left\lfloor \frac{{B_{pw}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} & {{otherwise}.} \end{Bmatrix}},{0 \leq i \leq 7},{m = 4}$ The full band PW mean vectors are constructed at subframes 4 and 8 by ${{\hat{S}}_{m}(k)} = \left\{ \begin{matrix} 0 & {{{{\hat{\kappa}}_{m}(0)} > k},{m = 4},8,} \\ {{{\hat{D}}_{m}(i)},} & {{{{\hat{\kappa}}_{m}(i)} \leq k < {{\hat{\kappa}}_{m}\left( {i + 1} \right)}},{0 \leq i \leq 6},{m = 4},8,} \\ 0 & {{{{\hat{\kappa}}_{m}(7)} \leq k \leq {\hat{K}}_{m}},{m = 4},8.} \end{matrix} \right.$

The PW magnitude vector can then be reconstructed for subframes 4 and 8 by adding the full band PW mean vector to the deviations vector. In the unvoiced mode, the deviations vector is assumed to be zero at the unselected harmonic indices. ${{\hat{P}}_{m}\left( {k + {kstart}_{m}} \right)} = \left\{ \begin{matrix} 0 & {{k = 0},{m = 4},8,} \\ {{{MAX}\left( {0.15,{{{\hat{S}}_{m}\left( {k + {kstart}_{m}} \right)} + {{\hat{F}}_{m}(k)}}} \right)},} & {{1 \leq k \leq 10},{m = 4},} \\ {{{MAX}\left( {0.15,{{\hat{S}}_{m}\left( {k + {kstart}_{m}} \right)}} \right)},} & {{11 \leq k \leq {\hat{K}}_{m}},{m =}} \\ 0 & {{{\hat{K}}_{m} < k \leq 60},{m = 4},8} \end{matrix} \right.$ Here, kstart_(m) is computed in the same manner as in the encoder in equation (107).

The PW magnitude vector is reconstructed for the remaining subframes by linearly interpolating between subframes 0 and 4 (for subframes 1, 2 and 3) and between subframes 4 and 8 (for subframes 5, 6 and 7): $\begin{matrix} {{1\mspace{20mu}{{\hat{P}}_{m}(k)}} = \left\{ \begin{matrix} {\frac{{\left( {4 - m} \right){{\hat{P}}_{0}(k)}} + {m{{\hat{P}}_{4}(k)}}}{4},} & {{0 \leq k \leq {\hat{K}}_{m}},{m = 1},2,3,} \\ {\frac{{\left( {8 - m} \right){{\hat{P}}_{4}(k)}} + {\left( {m - 4} \right){{\hat{P}}_{8}(k)}}}{4},} & {{0 \leq k \leq {\hat{K}}_{m}},{m = 5},6,7.} \end{matrix} \right.} & (150) \end{matrix}$

In the voiced mode, the mean vector for subframe 8 is inverse quantized based on interframe prediction: {circumflex over (D)} ₈(i)=MAX(0.1,P _(DC) _(—) _(V)(i)+0.5({circumflex over (D)} ₀(i)−P _(DC) _(—) _(V)(i))+V _(PWM) _(—) _(V)(l* _(PWM) _(—) _(V) ,i)) 0≦i Here, {{circumflex over (D)}₈(i),0≦i≦6} is the 7-band subband PW mean vector, {V_(PWM) _(—) _(V)(l,i),0≦l≦127,0≦i≦6} is the 7-dimensional, 128 level voiced mean codebook, l*_(PWM) _(—) _(V) is the index for mean vector 8^(th) subframe and {P_(DC) _(—) _(V)(i),0≦i≦6} is a predetermined DC vector for the voiced mean vectors. Since the mean vector is an average of PW magnitudes, it should be nonnegative. This is enforced by the maximization operation in the above equation.

As in the case of unvoiced frames, if the values of PW mean in the highest two bands are excessive, and this occurs in conjuntion with LP synthesis filter with a high frequency emphasis, attenuation is applied to the PW mean values in the highest two bands. The magnitude squared frequency response of the LP synthesis filter is averaged across two bands, 0–2 kHz and 2–4 kHz, as in the unvoiced mode. An average of the PW magnitude in the 1^(st) 5 subbands is computed for subframe 8, as in the unvoiced mode. Based on these values, the PW mean in the upper two bands is attenuated according to the flowchart shown in FIG. 9.

FIG. 9 is a flow chart of a method 900 for attenuating PW mean high frequency voice bands. The method 900 is performed at the decoder 100B prior to being processed by modules 124 and 126 and is initiated at step 902 where the adjustment for the PW mean high frequency voice band for subframe 8 begins. The method then proceeds to step 904.

At step 904 a determination is made as to whether Slb is less than 1.33S_(hb). If the determination is answered negatively, the method proceeds to step 906 where D_(m)(5) and D_(m)(6) are calculated using a first equation. If the determination at step 904 is answered affirmatively, the method proceeds to step 908 where D_(m)(5) and D_(m)(6) are calculated using a second equation.

Steps 906 and 908 proceed to step 910 where the adjustment of the PW mean for high frequency bands for subframe 8 ends.

A subband mean vector is constructed for subframe 4 by linearly interpolating between subframes 0 and 8: {circumflex over (D)} ₄(i)=0.5({circumflex over (D)} ₀(i)+{circumflex over (D)} ₈(i)), 0≦i≦6.  (152) The full band PW mean vectors are constructed at subframes 4 and 8 by ${{\hat{S}}_{m}(k)} = \left\{ \begin{matrix} 0 & {{{{\hat{\kappa}}_{m}(0)} > k},{m = 4},8,} \\ {{{\hat{D}}_{m}(i)},} & {{{{\hat{\kappa}}_{m}(i)} \leq k < {{\hat{\kappa}}_{m}\left( {i + 1} \right)}},{0 \leq i \leq 6},{m = 4},8,} \\ 0 & {{{{\hat{\kappa}}_{m}(7)} \leq k \leq {\hat{K}}_{m}},4,8.} \end{matrix} \right.$ The harmonic band edges {{circumflex over (κ)}_(m)(i), 0≦i≦7} are computed as in the case of unvoiced mode.

The voiced deviation vectors for subframes 4 and 8 are predictively quantized by a multistage vector quantizer with 2 stages. These prediction error vectors are inverse quantized by adding the contributions of the 2 codebooks: {circumflex over (B)} _(m)(k)=V _(PWD) _(—) _(V1)(l* _(PWD) _(—) _(V1) _(—) _(m) ,k)+V _(PWD) _(—) _(V2)(l* _(PWD) _(—) _(V2) _(—) _(m) ,k), 1≦i≦10,m=4,8 Here, {{circumflex over (B)}₄(i),0≦i≦9} and {{circumflex over (B)}₈(i),0≦i≦9} are the PW deviation prediction error vectors for subframes 4 and 8 respectively. {V_(PWD) _(—) _(V1)(l,k),0≦l≦63,1≦k≦10} is the 10-dimensional, 64 level voiced deviations codebook for the 1^(st) stage. {V_(PWD) _(—) _(V2)(l,k),0≦l≦15,1≦k≦10} is the 10-dimensional, 16 level voiced deviations codebook for the 2^(nd) stage. l*_(PWD) _(—) _(V1) _(—) ₄ and l*_(PWD) _(—) _(V2) _(—) ₄ are the 1^(st) and 2^(nd) stage indices for the deviations vector for the 4^(th) subframe. l*_(PWD) _(—) _(V1) _(—) ₈ and l*_(PWD) _(—) _(V2) _(—) ₈ are the 1^(st) and 2^(nd) stage indices for the deviations vector for the 8^(th) subframe. The deviations vectors are constructed by adding the predicted components to the pediction error vectors: {circumflex over (F)} _(m)(k)={circumflex over (B)} _(m)(k)+0.55{circumflex over (F)} ₀(k), 1≦k≦10,m=4,8.  (155) It should be noted that {{circumflex over (F)}₀(k),1≦k≦10} is the decoded deviations vector from subframe 8 of the previous frame. If the previous frame was unvoiced, this vector is set to zero. The PW magnitude vector can then be reconstructed for subframes 4 and 8 by adding the full band PW mean vector to the deviations vector. The deviations vector is assumed to be zero at the unselected harmonic indices. ${{\hat{P}}_{m}\left( {k + {kstart}_{m}} \right)} = \left\{ \begin{matrix} 0 & {{k = 0},{m = 4},8,} \\ {{{MAX}\left( {0.1,{{{\hat{S}}_{m}\left( {k + {kstart}_{m}} \right)} + {{\hat{F}}_{m}(k)}}} \right)},} & {{1 \leq k \leq 10},{m = 4}} \\ {{{MAX}\left( {0.1,{{\hat{S}}_{m}\left( {k + {kstart}_{m}} \right)}} \right)},} & {{11 \leq k \leq {\hat{K}}_{m}},{m =}} \\ 0 & {{{\hat{K}}_{m} < k \leq 60},{m = 4}} \end{matrix} \right.$ Here, kstart_(m) is computed in the same manner as in the encoder in equation (107).

The PW magnitude vector is reconstructed for the remaining subframes by linearly interpolating between subframes 0 and 4 (for subframes 1, 2 and 3) and between subframes 4 and 8 (for subframes 5, 6 and 7): ${{\hat{P}}_{m}(k)} = \left\{ \begin{matrix} {\frac{{\left( {4 - m} \right){{\hat{P}}_{0}(k)}} + {m{{\hat{P}}_{4}(k)}}}{4},} & {{0 \leq k \leq {\hat{K}}_{m}},{m = 1},2,3,} \\ {\frac{{\left( {8 - m} \right){{\hat{P}}_{4}(k)}} + {\left( {m - 4} \right){{\hat{P}}_{8}(k)}}}{4},} & {{0 \leq k \leq {\hat{K}}_{m}},{m = 5},6,7.} \end{matrix} \right.$ It should be noted that {{circumflex over (P)}₀(i),0≦i≦60} is the decoded PW magnitude vector from subframe 8 of the previous frame.

In the FDI codec 100, there is no explicit coding of PW phase. The salient characteristics related to the phase, such as the degree of stationarity of the PW (i.e., periodicity of the time domain residual) and the variation of the stationarity as a function of frequency are encoded in the form of the quantized voicing measure {circumflex over (ν)} and the vector nonstationarity measure

respectively. A PW phase vector is constructed for each subframe based on this information by a two step process. In this process, the phase of the PW is modeled as the phase of a weighted complex vector sum of a stationary component and a nonstationary component.

In the first step, a stationary component is constructed using the decoded voicing measure {circumflex over (ν)}. First a complex vector is constructed, by a weighted combination of the following: the phase vector of the stationary component of the previous, i.e., m−1^(th), sub-frame {{overscore (φ)}_(m−1)(k),0≦k≦{circumflex over (K)}_(m−1)}, a random phase vector {γ_(m)(k),0≦k≦{circumflex over (K)}_(m)}, and a fixed phase vector that is obtained from a residual voiced pitch pulse waveform {φ_(fix)(k),0≦k≦{circumflex over (K)}_(m)}.

In order to combine the previous phase vector which has {circumflex over (K)}_(m−1) components with the random phase vector which has {circumflex over (K)}_(m) components, it may be necessary to used a modified version of the previous phase vector. If there is no pitch discontinuity between the previous and the current subframes, this modification is simply a truncation (if {circumflex over (K)}_(m−1)>{circumflex over (K)}_(m)) or padding by random phase values (if {circumflex over (K)}_(m−1)<{circumflex over (K)}_(m)). If there is a pitch discontinuity, it is necessary to align the two phase vectors such that the harmonic frequencies corresponding to the vector elements are as close as possible. This may require either interlacing or decimating the previous phase vector. For example, if the pitch period of the current subframe is roughly l-times that of the previous subframe, l{circumflex over (K)}_(m−1)≅{circumflex over (K)}_(m). In this case, each element of the previous phase vector is interlaced with l−1 random phase values. On the other hand, if the the pitch period of the previous subframe is roughly l-times that of the current subframe, {circumflex over (K)}_(m−1)≅l{circumflex over (K)}_(m). In this case, for each element of the previous phase vector, the next l−1 elements are dropped. In either case, the dimension of the modified previous phase vector will have the same dimension as that for the current subframe. The modified previous phase vector will be denoted by {ψ_(m−1)(k),0≦k≦{circumflex over (K)}_(m)}.

The random phase vector provides a method of controlling the degree of stationarity of the phase of the stationary component. However, to prevent excessive randomization of the phase, the random phase component is not allowed to change every subframe, but is changed after several sub-frames depending on the pitch period. Also, the random phase component at a given harmonic index alternates in sign in successive changes. At the 1^(st) sub-frame in every frame, the rate of randomization for the current frame is determined based on the pitch period. For highly aperiodic frames, the highest rate of randomization is used regardless of the pitch period. The subframes for which the random vector is updated can be summarized as follows:

-   -   rate 1: m=1,3,5,7 l*_(R)>7 or 20≦{circumflex over (p)}<64     -   rate 2: m=1,4,6 l*_(R)≦7 and 64≦{circumflex over (p)}≦90     -   rate 3: m=1,5, l*_(R)≦7 and 90<{circumflex over (p)}≦120.

In addition, abrupt changes in the update rate of the random phase, i.e., from rate 1 in the previous frame to the rate 3 in the current frame or vice-versa are not permitted. Such cases are modified to the rate 2 in the current frame. Controlling the rate at which the phase is randomized is quite important to prevent artifacts in the reproduced signal, especially in the presence of background noise. If the phase is randomized every subframe, it leads to a fluttering of the reproduced signal. This is due to the fact that such a randomization is not representative of natural signals.

The random phase value is determined by a random number generator, which generates uniformly distributed random numbers over a sub-interval of 0−π radians. The sub-interval is determined based on the decoded voicing measure {circumflex over (ν)} and a stationarity measure ζ(m). A weighted sum of the elements of the nonstationary measure vector for the current frame is computed by $\eta = \left\{ \begin{matrix} {{0.55(0)} + {0.49(1)} + {0.35(2)} + {0.21(3)}} & {l_{R}^{*} > 7} \\ {{0.32(0)} + {0.32(1)} + {0.32(2)} + {0.32(3)} + {0.32(4)}} & {l_{R}^{*} \leq 7.} \end{matrix} \right.$

This is a scalar measure of the nonstationarity of the current frame. If η_(prev) is the corresponding value for the previous frame, an interpolated stationarity measure is computed for each subframe is obtained by: ${\zeta(m)} = \left\{ {{\begin{matrix} {{MAX}\left\lbrack {0.65,\frac{8}{\left( {{\left( {8 - m} \right)\eta_{prev}} + {m\;\eta}} \right)}} \right\rbrack} & {{l_{R}^{*} \leq 7},} \\ \frac{8}{\left( {{\left( {8 - m} \right)\eta_{prev}} + {m\;\eta}} \right)} & {l_{R}^{*} > 7} \end{matrix}\; 1} \leq m \leq 8.} \right.$

The sub-interval of [0−π] used for phase randomization is $\left\lbrack {\frac{{\pi\mu}_{1}}{2} - {\pi\mu}_{1}} \right\rbrack,$ wherein μ₁ is determined based on the following rule depending on the stationarity of the subframe: $\mu_{1} = \left\{ \begin{matrix} {0.5 - {0.25{\zeta(m)}}} & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\ {0.25 + {0.0625\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 3.0},} \\ 0.125 & {l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} \geq {3.0.}} \\ 1.0 & {{l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\ {1.0 + {0.125\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 3.0},} \\ 0.75 & {l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} \geq {3.0.}} \end{matrix} \right.$

As the subframe becomes more stationary (ζ(m) relatively high valued), μ₁ takes on lower values, thereby creating smaller values of random phase perturbation. As the stationarity of the subframe decreases, μ₁ takes on higher values, resulting in higher values of random phase perturbation. Uniformly distributed random numbers in the interval $\left\lbrack {\frac{{\pi\mu}_{1}}{2} - {\pi\mu}_{1}} \right\rbrack$ are used as random phases. In addition, the sign of the the random phase at any given harmonic index is alternated from one update to the next, to remove any bias in phase randomization. The weighted phase combination of the random phase, previous phase and fixed phase is performed in two steps. In the 1^(st) step, the random phase and the previous phase are added directly resulting in a randomized previous phase vector: ξ_(m)(k)=ψ_(m−1)(k)+γ_(m)(k), 0≦k≦{circumflex over (K)} _(m).  (161)

In the 2^(nd) step, the randomized phase vector as well as the fixed phase vector are combined with unity magnitude and a weighted vector addition is performed. This results in a complex vector, which in general does not have unity magnitude: ${\left. \begin{matrix} {{{{Re}\left\lbrack {U_{m}^{\prime}(k)} \right\rbrack} = {{{\cos\left( {\xi_{m}(k)} \right)}\alpha_{1}} + {{\cos\left( {\varphi_{fix}(k)} \right)}\left( {1 - \alpha_{1}} \right)}}},} \\ {{{{Im}\left\lbrack {U_{m}^{\prime}(k)} \right\rbrack} = {{{\sin\left( {\xi_{m}(k)} \right)}\alpha_{1}} + {{\sin\left( {\varphi_{fix}(k)} \right)}\left( {1 - \alpha_{1}} \right)}}},} \end{matrix} \right\} 0} \leq k \leq {{\hat{K}}_{m}.}$ where, α₁ is a weighting factor determined based on the quantized voicing measure {circumflex over (ν)} and the stationarity measure ζ(m) computed by: $\alpha_{1} = \left\{ \begin{matrix} {0.5 - {0.2{\zeta(m)}}} & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\ {0.3 + {0.1\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 3.0},} \\ 0.1 & {l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} \geq {3.0.}} \\ {1.0 - {0.2{\zeta(m)}}} & {{l_{R}^{*} < {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\ {0.8 + {0.15\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 3.0},} \\ 0.5 & {l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} \geq {3.0.}} \end{matrix} \right.$

As the subframe becomes more stationary (ζ(m) relatively high valued), α₁ takes on lower values, increasing the contribution of the fixed phase vector. Conversely, as the stationarity of the subframe decreases, α₁ takes on higher values, increasing the contribution of the randomized phase. The resulting vector is normalized to unity magnitude as follows: $\begin{matrix} {{U_{m}^{''}(k)} = {{\frac{U_{m}^{\prime}(k)}{{{U_{m}^{\prime}(k)}}^{2}}0} \leq k \leq {{\hat{K}}_{m}.}}} & (164) \end{matrix}$ Also, the phase of this vector is computed to serve as the previous phase during the next subframe: $\begin{matrix} {{\varphi_{m}(k)} = {{{\arctan\left( \frac{{Im}\left\lbrack {U_{m}^{''}(k)} \right\rbrack}{{Re}\left\lbrack {U_{m}^{''}(k)} \right\rbrack} \right)}0} \leq k \leq {{\hat{K}}_{m}.}}} & (165) \end{matrix}$

The above normalized vector is passed through an evolutionary low pass filter (i.e., low pass filtering along each harmonic track) to limit excessive variations, so that a signal having stationary characteristics (in the evolutionary sense) is obtained. Stationarity implies that variations faster than 25 Hz are minimal. However, due to phase models used and the random phase component it is possible to have excessive variations. This is undesirable since it produces speech that is rough and lacks naturalness during voiced sounds. The low pass filtering operation overcomes this problem. Delay constraints preclude the use of linear phase FIR filters. Consequently, second order IIR filters are employed. The filter transfer function is given by $\begin{matrix} {{H_{ph1}(z)} = {\frac{b_{0} + {b_{1}z^{- 1}} + {b_{2}z^{- 2}}}{1 + {a_{1}z^{- 1}} + {a_{2}z^{- 2}}}.}} & (166) \end{matrix}$

The filter parameters are obtained by interpolating between two sets of filter parameters. One set of filter parameters corresponds to a low evolutionary bandwidth and the other to a much wider evolutionary bandwidth. The interpolation factor is selected based on the stationarity measure (ζ(m)), so that the bandwidth of the LPF constructed by interpolation between these two extremes allows the right degree of stationarity in the filtered signal. The filter parameters corresponding to low evolutionary bandwidth are: $\begin{matrix} {{a_{op} = 1},{a_{1p} = {{- 1.77}{\cos\left( \frac{10\pi}{250} \right)}}},{a_{2p} = 1.77},{b_{op} = {1/7}},{b_{1p} = {{- 0.2}{\cos\left( \frac{40\pi}{250} \right)}}},{b_{2p} = {0.07.}}} & (167) \end{matrix}$

The filter parameters corresponding to high evolutionary bandwidth are:

-   -   a_(0ap)=1, a_(1ap)=−1.523326, a_(2ap)=0.6494950,     -   b_(0ap)=0.395304917, b_(1ap)=−0.367045695, b_(2ap)=0.146146091.         The interpolation parameter is computed based on the         stationarity measure as follows:         $\alpha_{2} = \left\{ \begin{matrix}         0.2 & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\         {0.2 + {0.2\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 2.0},} \\         0 & {l_{R}^{*} > {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < {2.0.}} \\         1.0 & {{l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 1.0},} \\         {1.0 + {0.32\left( {1 - {\zeta(m)}} \right)}} & {{l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < 3.5},} \\         0.2 & {l_{R}^{*} \leq {7\mspace{14mu}{and}\mspace{14mu}{\zeta(m)}} < {3.5.}}         \end{matrix} \right.$

It is desirable to prevent excessive variations in α₂ from one subframe to the next, as this would result in large variations in the filter characteristics. A modified interpolation parameter β₂ is computed by introducing hysteresis as follows: $\begin{matrix} {\beta_{2} = \left\{ \begin{matrix} {{{MIN}\left\lfloor {1.0,{\beta_{2{prev}} + {{MAX}\left( {{0.2\beta_{2{prev}}},0.05} \right)}}} \right\rfloor},} & {{\alpha_{2} > {\beta_{2{prev}} + {{MAX}\left( {{0.2\beta_{2{prev}}},0.05} \right)}}},} \\ {{{MAX}\left\lfloor {0.0,{\beta_{2{prev}} - {{MAX}\left( {{0.3\beta_{2{prev}}},0.05} \right)}}} \right\rfloor},} & {{\alpha_{2} < {\beta_{2{prev}} - {{MAX}\left( {{0.3\beta_{2{prev}}},0.05} \right)}}},} \\ \alpha_{2} & {{otherwise}.} \end{matrix} \right.} & (170) \end{matrix}$ Here, β_(2prev) is the modified interpolation parameter β₂ computed during the preceding subframe. The interpolated filter parameters are computed by: $\begin{matrix} {{{\left. \begin{matrix} {{a_{j} = {{\beta_{2}a_{jap}} + {\left( {1 - \beta_{2}} \right)a_{jp}}}},} \\ {{b_{j} = {{\beta_{2}b_{jap}} + {\left( {1 - \beta_{2}} \right)b_{jp}}}},} \end{matrix} \right\} j} = 0},1,2.} & (171) \end{matrix}$ The evolutionary low pass filtering operation is represented by Û _(m)(k)=U″ _(m)(k)+b ₁ U″ _(m−1)(k)+b ₂ U″ _(m−2)(k)−a ₁ Û _(m−1)(k)−a ₂ Û _(m−2)(k), 0≦k≦{circumflex over (K)} _(m), 0<m≦8.  (172) It should be noted that, if there is a pitch discontinuity, the filter state vectors, (i.e., U″_(m−1)(k),U″_(m−2)(k),Û_(m−1)(k),Û_(m−2)(k)) can require truncation, interlacing and/or decimation to align the vector elements such that the harmonic frequencies are paired with minimal discontinuity. This procedure is similar to that described for the previous phase vector above.

The phase spectrum of the resulting stationary component vector Û_(m)(k) has the desired evolutionary characteristics, consistent with the stationary component of the residual signal at the encoder 100A.

In the second step of phase construction, a nonstationary PW component is constructed, also using the decoded voicing measure {circumflex over (ν)}. The nonstationary component is expected to have some correlation with the stationary component. The correlation is higher for periodic signals and lower for aperiodic signals. To take this into account, the nonstationary component is constructed by a weighted addition of the stationary component and a complex random signal. The random signal has unity magnitude at all the harmonics.

In other words, only the phase of the random signal is randomized. In addition, the RMS value of the random signal is normalized such that it is equal to the RMS value of the stationary component, computed by: $\begin{matrix} {{\hat{G}}_{s} = {\sqrt{\frac{{\sum\limits_{k = 1}^{{\hat{K}}_{m}}{{{\hat{U}}_{m}(k)}}^{2}}\;}{{\hat{K}}_{m}}}.}} & (173) \end{matrix}$

The weighting factor used in combining the stationary and noise components is computed based on the voicing measure and the nonstationarity measure quantization index by: $\begin{matrix} {\beta_{3} = \left\{ \begin{matrix} {{{0.775 - {\frac{0.625}{1 + e^{{- 5}{({\hat{v} - 025})}}}\; l_{R}^{*}}} > 7},} \\ {{0.835 - {\frac{0.835}{1 + e^{{- 9}{({\hat{v} - 0425})}}}\; l_{R}^{*}}} \leq 7.} \end{matrix} \right.} & (174) \end{matrix}$

The weighting factor is increases with the periodicity of the signal. Thus, for periodic frames, the correlation between the stationary and nonstationary components is higher than for aperiodic frames. In addition, this correlation is expected to decrease with increasing frequency. This is incorporated by decreasing the weighting factor with increasing harmonic index: $\begin{matrix} {{{\partial_{3}(k)} = {\beta_{3} - {\frac{\left( {0.5 + {0.5\hat{v}}} \right)\beta_{3}}{{\hat{K}}_{m}}k}}},\mspace{14mu}{0 \leq k \leq {{\hat{K}}_{m}.}}} & (175) \end{matrix}$

Thus, the weighting factor decreases linearly from β₃ at k=0 to β₃−(0.5+0.5{circumflex over (ν)})β₃ at k={circumflex over (K)}_(m). The slope of this decrease is higher for aperiodic frames; i.e., for aperiodic frames the correlation with the stationary component starts at a lower value and decreases more rapidly than for periodic frames. The nonstationary component is then computed by: {circumflex over (R)} _(m)(k)=∂₃(k)Û _(m)(k)+[1−∂₃(k)]G′ _(S) N′ _(m)(k), 0≦k≦{circumflex over (K)} _(m).  (176) Here {N′_(m)(k),0≦k≦{circumflex over (K)}_(m)} is the unity magnitude complex random signal and {{circumflex over (R)}_(m)(k),0≦k≦{circumflex over (K)}_(m)} is the nonstationary PW component.

The stationary and nonstationary PW components are combined by a weighted sum to construct the complex PW vector. The subband nonstationarity measure determines the frequency dependent weights that are used in this weighted sum. The weights are detemined such that the ratio of the RMS value of the nonstationary component to that of the stationary component is equal to the decoded nonstationarity measure within each subband. From equation 90, the band edges in Hz are defined by the array B _(rs)=[1 400 800 1600 2400 3400]. As in the case of the encoder 100A, the subband edges in Hz are translated to subband edges in terms of harmonic indices such that the i^(th) subband contains harmonics with indices {{circumflex over (η)}(i−1)≦k<{circumflex over (η)}(i),1≦i≦5}: ${{\hat{\eta}(i)} = \begin{Bmatrix} {2 + \left\lfloor \frac{{B_{rs}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} & {{\left\{ {1 + \left\lfloor \frac{{B_{rs}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} \right\} < \frac{{B_{rs}(i)}\pi}{4000\omega_{m}}},} \\ \left\lfloor \frac{{B_{rs}(i)}{\hat{K}}_{m}}{4000} \right\rfloor & {{\left\lfloor \frac{{B_{rs}(i)}{\hat{K}}_{m}}{4000} \right\rfloor > \frac{{B_{rs}(i)}\pi}{4000\omega_{m}}},} \\ {1 + \left\lfloor \frac{{B_{rs}(i)}{\hat{K}}_{m}}{4000} \right\rfloor} & {{otherwise}.} \end{Bmatrix}},{0 \leq i \leq 5.}$

The energy in each subband is computed by averaging the squared magnitude of each harmonic within the subband. For the stationary component, the subband energy distribution for the m^(th) subframe is computed by $\begin{matrix} {{E{{\hat{S}}_{m}(l)}} = {{\frac{1}{2\left( {{\hat{\eta}(l)} - {\hat{\eta}\left( {l - 1} \right)}} \right)}{\sum\limits_{k = {{\hat{\eta}}_{m}{({l - 1})}}}^{{{\hat{\eta}}_{m}{(l)}} - 1}\;{{{{\hat{U}}_{m}(k)}}^{2}\mspace{11mu} 1}}} \leq l \leq 5.}} & (178) \end{matrix}$ For the nonstationary component, the subband energy distribution for the m^(th) subframe is computed by $\begin{matrix} {{E{{\hat{R}}_{m}(l)}} = {{\frac{1}{2\left( {{\hat{\eta}(l)} - {\hat{\eta}\left( {l - 1} \right)}} \right)}{\sum\limits_{k = {{\hat{\eta}}_{m}{({l - 1})}}}^{{{\hat{\eta}}_{m}{(l)}} - 1}\;{{{{\hat{R}}_{m}(k)}}^{2}\mspace{11mu} 1}}} \leq l \leq 5.}} & (179) \end{matrix}$ The subband weighting factors are computed by {{circumflex over (η)}(i−1)≦k<{circumflex over (η)}(i),1≦i≦5} $\begin{matrix} {{{G_{sb}(k)} = \sqrt{\frac{E{{\hat{S}}_{m}(l)}}{E{{\hat{R}}_{m}(l)}}}},{\forall{k:{{\hat{\eta}\left( {l - 1} \right)} \leq k < {\hat{\eta}(l)}}}},\mspace{14mu}{1 \leq l \leq 5.}} & (180) \end{matrix}$ Since the bandedges exclude out-of-band components, it is necessary to explicitly initialize the weighting factors for the out-of-band components: $\begin{matrix} {{{G_{sb}(k)} = \sqrt{\frac{E{{\hat{S}}_{m}(1)}}{E{{\hat{R}}_{m}(1)}}}},\mspace{11mu}{0 \leq k < {\hat{\eta}(0)}},{{G_{sb}(k)} = \sqrt{\frac{E{{\hat{S}}_{m}(5)}}{E{{\hat{R}}_{m}(5)}}}},\mspace{11mu}{{\hat{K}}_{m} \geq k \geq {{\hat{\eta}(5)}.}}} & (181) \end{matrix}$ The complex PW vector can now be constructed as a weighted combination of the complex stationary and complex nonstationary components: {circumflex over (V)}′ _(m)(k)=Û _(m)(k)+{circumflex over (R)} _(m)(k)G _(sb)(k), 0≦k≦{circumflex over (K)} _(m), 1≦m≦8.  (182) However, it should be noted that this vector will have the desired phase characteristics, but not the decoded PW magnitude. To obtain a PW vector with the decoded magnitude and the desired phase, it is necessary to normalize the above vector to unity magnitude and multiply it with the decoded magnitude vector: $\begin{matrix} {{{{\hat{V}}_{m}^{''}(k)} = {\frac{{\hat{V}}_{m}^{\prime}(k)}{{{\hat{V}}_{m}^{\prime}(k)}}{{\hat{P}}_{m}(k)}}},\mspace{11mu}{0 \leq k \leq {\hat{K}}_{m}},\mspace{11mu}{1 \leq m \leq 8.}} & (183) \end{matrix}$ This vector is the reconstructed (normalized) PW magnitude vector for subframe m.

The inverse quantized PW vector may have high valued components outside the band of interest. Such components can deteriorate the quality of the reconstructed signal and should be attenuated. At the high frequency end, harmonics above 3400 Hz are attenuated. At the low frequency end, only the DC component (i.e., the 0 Hz component) is attenuated. The attenuation characteristic is linear from 1 at the bandedge to 0 to 4000 Hz. The attenuation process can be specified by: ${{\hat{V}}_{m}^{\prime''}(k)} = \left\{ \begin{matrix} 0 & {{k = 0},} \\ {{\hat{V}}_{m}^{''}(k)} & {{1 \leq k < k_{um}},} \\ {{{\hat{V}}_{m}^{''}(k)}\frac{4000\left( {\pi - {k\;{\hat{\omega}}_{m}}} \right)}{600\pi}} & {k_{um} \leq k \leq {{\hat{K}}_{m}.}} \end{matrix} \right.$ where, k_(um) is the index of the lowest pitch harmonic that falls above 3400 Hz. It is obtained by $\begin{matrix} {k_{um} = {\left\lfloor {\frac{3400}{4000}{\hat{K}}_{m}} \right\rfloor + 1.}} & (185) \end{matrix}$

Certain types of background noise can result in LP parameters that correspond to sharp spectral peaks. Examples of such noise are babble noise and interfering talker. Peaky spectra during background noise is undesirable since it leads to a highly dynamic reconstructed noise that interferes with the speech signal. This can be mitigated by a mild degree of bandwidth broadening that is adapted based on the RVAD_FLAG_FINAL computed according to table 3.6.3-3. Bandwidth broadening is also controlled by the nonstationarity index. If the index takes on values above 7, indicating an voiced frame, no bandwidth broadening is applied. For values of the nonstationarity index 7 or lower, a bandwidth broadening factor is selected jointly with the RVAD_FLAG_FINAL according to the following equation: φ=Φ(2RVAD_FLAG_FINAL+VM_INDEX)  (186) where VM_INDEX is related to l*_(R) as follows: VM_INDEX=MIN(3,MAX(0,(l* _(R)−5)))  (187) and the 9-dimensional array Φ is defined as follows in Table 3:

TABLE 3 Φ(0) Φ(1) Φ(2) Φ(3) Φ(4) Φ(5) Φ(6) Φ(7) Φ(8) 0.96 0.96 0.96 0.97 0.975 0.98 0.99 0.99 0.99

Bandwidth broadening is performed only during intervals of voice inactivity. Bandwidth expansion increases as the frame becomes more unvoiced. Onset and offset frames have a lower degree of bandwidth broadening compared to frames during voice inactivity. Bandwidth expansion is applied to interpolated LPC parameters as follows: â′ _(m)(j)=â _(m)(j)φ^(m) 0≦m≦10, 1≦j≦8.  (188)

The level of the PW vector is restored to the RMS value represented by the decoded PW gain. Due to the quantization process, the RMS value of the decoded PW vector is not guarenteed to be unity. To ensure that the right level is achieved, it is necessary to first normalize the PW by its RMS value and then scale it by the PW gain. The RMS value is computed by $\begin{matrix} {{g_{rms}(m)} = {{\sqrt{\frac{1}{{2{\hat{K}}_{m}} + 2}{\sum\limits_{k = 0}^{{\hat{K}}_{m}}\;{{{\hat{V}}_{m}^{''\prime}(k)}}^{2}}}\mspace{20mu} 1} \leq m \leq 8.}} & (189) \end{matrix}$ The PW vector sequence is scaled by the ratio of the PW gain and the RMS value for each subframe: $\begin{matrix} {{{{\hat{V}}_{m}(k)} = {{\frac{{\hat{g}}_{pw}^{\prime}(m)}{g_{rms}(m)}{V_{m}^{''\prime}(k)}\mspace{20mu} 0} \leq k \leq {\hat{K}}_{m}}},{1 \leq m \leq 8.}} & (190) \end{matrix}$

The excitation signal is constructed from the PW using an interpolative frequency domain synthesis process. This process is equivalent to linearly interpolating the PW vectors bordering each subframe to obtain a PW vector for each sample instant, and performing a pitch cycle inverse DFT of the interpolated PW to compute a single time-domain excitation sample at that sample instant.

The interpolated PW represents an aligned pitch cycle waveform. This waveform is to be evaluated at a point in the pitch cycle (i.e., pitch cycle phase), advanced from the phase of the previous sample by the radian pitch frequency. The pitch cycle phase of the excitation signal at the sample instant determines the time sample to be evaluated by the inverse DFT. Phases of successive excitation samples advance within the pitch cycle by phase increments determined by the linearized pitch frequency contour.

The computation of the n^(th) sample of the excitation signal in the m^(th) sub-frame of the current frame can be conceptually represented by $\begin{matrix} {{{\hat{e}\left( {{20\left( {m - 1} \right)} + n} \right)} = {\frac{1}{20\left( {{\hat{K}}_{m} + 1} \right)}{\sum\limits_{k = 0}^{{\hat{K}}_{m}}\;{\left\lbrack {{\left( {20 - n} \right){{\hat{V}}_{m - 1}(k)}} + {n{{\hat{V}}_{m}(k)}}} \right\rbrack{\mathbb{e}}^{{{j\theta}{({{20{({m - 1})}} + n})}}k}}}}},{0 \leq n < 20},{0 < m \leq 8},{0 \leq}} & (191) \end{matrix}$ where, θ(20(m−1)+n) is the pitch cycle phase at the n^(th) sample of the excitation in the m^(th) sub-frame. It is recursively computed as the sum of the pitch cycle phase at the previous sample instant and the pitch frequency at the current sample instant: θ(20(m−1)+n)=θ(20(m−1)+n−1)+{circumflex over (ω)}(20(m−1)+n), 0≦n<20  (192)

This is essentially a numerical integration of the sample-by-sample pitch frequency track to obtain the sample-by-sample pitch cycle phase. It is also possible to use trapezoidal integration of the pitch frequency track to get a more accurate and smoother phase track by θ(20(m−1)+n)=θ(20(m−1)+n−1)+0.5[{circumflex over (ω)}(20(m−1)+n−1)+{circumflex over (ω)}(20(m−1)+n)] 0≦n<20  (193)

In either case, the first term circularly shifts the pitch cycle so that the desired pitch cycle phase occurs at the current sample instant. The second term results in the exponential basis functions for the pitch cycle inverse DFT.

The approach above is a conceptual description of the excitation synthesis operation. Direct implementation of this approach is possible, but is highly computation intensive. The process can be simplified by using radix-2 FFT to compute an oversampled pitch cycle and by performing interpolations in the time domain. These techniques have been employed to achieve a computation efficient implementation.

The resulting excitation signal {ê(n),0≦n<160} is processed by an all-pole LP synthesis filter, constructed using the decoded and interpolated LP parameters. The first half of each sub-frame is synthesized using the LP parameters at the left edge of the sub-frame and the second half by the LP parameters at the right edge of the sub-frame. This ensures that locally optimal LP parameters are used to reconstruct the speech signal. The transfer function of the LP synthesis filter for the first half of the m^(th) subframe is given by $\begin{matrix} {{H_{LPm1}(z)} = {\frac{1}{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}z^{- l}}}\mspace{14mu}{and}\mspace{14mu}{for}\mspace{14mu}{the}\mspace{14mu}{second}\mspace{14mu}{half}}} & (194) \\ {{H_{LPm2}(z)} = \frac{1}{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}(m)}z^{- l}}}} & (195) \end{matrix}$ The signal reconstruction is expressed by $\begin{matrix} {{\hat{s}\left( {{20\left( {m - 1} \right)} + n} \right)} = \left\{ \begin{matrix} {{{\hat{e}\left( {{20\left( {m - 1} \right)} + n} \right)} - {\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}{\hat{s}\left( {{20\left( {m - 1} \right)} + n - l} \right)}}}},\mspace{14mu}{0 \leq n < 10},\mspace{14mu}{0 < m \leq 8}} \\ {{{\hat{e}\left( {{20\left( {m - 1} \right)} + n} \right)} - {\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}(m)}{\hat{s}\left( {{20\left( {m - 1} \right)} + n - l} \right)}}}},\mspace{14mu}{10 \leq n < 20},\mspace{14mu}{0 < m \leq 8.}} \end{matrix} \right.} & (196) \end{matrix}$ The resulting signal {ŝ(n),0≦n<160} is the reconstructed speech signal.

The reconstructed speech signal is processed by an adaptive postfilter to reduce the audibility of the effects of modeling and quantization. A pole-zero postfilter with an adaptive tilt correction is employed as disclosed in “Adaptive Postfiltering for Quality Enhancement of Coded Speech”, IEEE Transactions on Speech and Audio Processing, Vol. 3, No. 1, pages 59–71, January 1995 by J. H. Chen and A. Gersho which is incorporated by reference in its entirety.

The postfilter emphasizes the formant regions and attenuates the valleys between formants. As during speech reconstruction, the first half of the sub-frame is postfiltered by parameters derived from the LPC parameters at the left edge of the sub-frame. The second half of the sub-frame is postfiltered by the parameters derived from the LPC parameters at the right edge of the sub-frame. For the m^(th) sub-frame, these two postfilter transfer functions are specified respectively by $\begin{matrix} {{H_{pf1}(z)} = {\frac{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}\beta_{pf}^{l}z^{- l}}}{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}\alpha_{pf}^{l}z^{- l}}}\mspace{14mu}{and}}} & (197) \\ {{H_{pf2}(z)} = \frac{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}(m)}\beta_{pf}^{l}z^{- l}}}{\sum\limits_{l = 0}^{10}\;{{a_{l}^{\prime}(m)}\alpha_{pf}^{l}z^{- l}}}} & (198) \end{matrix}$ The pole-zero postfiltering operation for the first half of the sub-frame is represented by $\begin{matrix} {{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n} \right)} = {{\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}\beta_{pf}^{l}{\hat{s}\left( {{20\left( {m - 1} \right)} + n - 1} \right)}}} - {\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}\left( {m - 1} \right)}\alpha_{pf}^{l}{{\hat{s}}_{pf1}\left( {{{{20\left( {m - 1} \right)} + n - {l0}} \leq n < 10},\mspace{14mu}{0 < m \leq 8.}} \right.}}}}} & (199) \end{matrix}$ The pole-zero postfiltering operation for the second half of the sub-frame is represented by $\begin{matrix} {{{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n} \right)} = {{\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}(m)}\beta_{pf}^{l}{\hat{s}\left( {{20\left( {m - 1} \right)} + n - l} \right)}}} - {\sum\limits_{l = 1}^{10}\;{{a_{l}^{\prime}(m)}\alpha_{pf}^{l}{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n - l} \right)}}}}},{10 \leq n < 20},\mspace{14mu}{0 < m \leq 8.}} & (200) \end{matrix}$ where, α_(pf) and β_(pf) are the postfilter parameters. These satisfy the constraint 0≦β_(pf)<α_(pf)≦1. A typical choice for these parameters is α_(pf)=0.875 and β_(pf)=0.6.

The postfilter introduces a frequency tilt with a mild low pass characteristic to the spectrum of the filtered speech, which leads to a muffling of postfiltered speech. This is corrected by a tilt-correction mechanism, which estimates the spectral tilt introduced by the postfilter and compensates for it by a high frequency emphasis. A tilt correction factor is estimated as the first normalized autocorrelation lag of the impulse response of the postfilter. Let ν_(pf1) and ν_(pf2) be the two tilt correction factors computed for the two postfilters in equations 197 and 198, respectively. Then the tilt correction operation for the two half sub-frames are as follows: $\begin{matrix} {{{\hat{s}}_{pf}\left( {{20\left( {m - 1} \right)} + n} \right)} = \left\{ \begin{matrix} {{{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n} \right)} - {0.8v_{pf1}{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n - 1} \right)}}},\mspace{14mu}{0 \leq n < 10},\mspace{14mu}{0 < m}} \\ {{{{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n} \right)} - {0.8v_{pf2}{\hat{s}}_{pf1}\left( {{20\left( {m - 1} \right)} + n - 1} \right)}},\mspace{14mu}{10 \leq n < 20},\mspace{14mu}{0 <}} \end{matrix} \right.} & (201) \end{matrix}$

The postfilter alters the energy of the speech signal. Hence it is desirable to restore the RMS value of the speech signal at the postfilter output to the RMS value of the speech signal at the postfilter input. The RMS value of the postfilter input speech for the m^(th) sub-frame is computed by: $\begin{matrix} {{{\sigma_{prepf}(m)} = \sqrt{\frac{1}{20}{\sum\limits_{n = 0}^{19}\;{{\hat{s}}^{2}\left( {{20\left( {m - 1} \right)} + n} \right)}}}}{0 < m \leq 8}} & (202) \end{matrix}$ The RMS value of the postfilter output speech for the m^(th) sub-frame is computed by: $\begin{matrix} {{{\sigma_{pf}(m)} = \sqrt{\frac{1}{20}{\sum\limits_{n = 0}^{19}{{\hat{s}}_{pf}^{2}\;\left( {{20\left( {m - 1} \right)} + n} \right)}}}}{0 < m \leq 8}} & (203) \end{matrix}$ An adaptive gain factor is computed by low pass filtering the ratio of the RMS value at the post filter input to the RMS value at the post filter output: $\begin{matrix} {{{g_{pf}\left( {{20\left( {m - 1} \right)} + n} \right)} = {{0.96{g_{pf}\left( {{20\left( {m - 1} \right)} + n - 1} \right)}} + {0.04\left( \frac{\sigma_{prepf1}(m)}{\sigma_{pf1}(m)} \right)}}},{0 \leq n < 20},{1 \leq m \leq 8.}} & (204) \end{matrix}$

The postfiltered speech is scaled by the gain factor as follows: s _(out)(20(m−1)+n)=g _(pf)(20(m−1)+n)ŝ _(pf)(20(m−1)+n), 0≦n<20, 0<m The resulting scaled postfiltered speech signal {s_(out)(n),0≦n<160} constitutes one frame (20 ms) of output speech of the decoder corresponding to the received 80 bit packet.

Those skilled in the art can now appreciate from the foregoing description that the broad teachings of the present invention can be implemented in a variety of forms. Therefore, while this invention has been described in connection with particular examples thereof, the true scope of the invention should not be so limited since other modifications will become apparent to the skilled practitioner upon a study of the drawings, specification and the following claims. 

1. A frequency domain interpolative CODEC system for low bit rate coding of speech, comprising: a linear prediction (LP) front end adapted to process an input signal providing LP parameters which are quantized and encoded over predetermined intervals and used to compute a LP residual signal; an open loop pitch estimator adapted to process said LP residual signal, a pitch quantizer, and a pitch interpolator adapted to provide a pitch contour within the predetermined intervals; and a signal processor responsive to said LP residual signal and the pitch contour and adapted to perform the following: extract a prototype waveform (PW) from the LP residual and the open loop pitch contour for a number of equal sub-intervals within the predetermined intervals; normalize the PW by said PW's gain; extract measures of periodicity from the normalized PW that are correlated to degrees of periodicity over each predetermined interval; extract measures of periodicity from open loop parameters derived from the input signal that are correlated to degrees of periodicity over each predetermined interval; and provide an overall voicing measure for each predetermined interval, said voicing measure characterizing a degree of voicing of said input signal, by combining the measures of periodicity extracted from the open loop parameters and the measures of periodicity extracted from the normalized PW over the predetermined intervals.
 2. A system as recited in claim 1, wherein the measures of periodicity extracted from the normalized PW include a measure of average PW correlation across the predetermined intervals.
 3. A system as recited in claim 1, wherein the measures of periodicity extracted from the normalized PW include a measure of PW non-stationarity across low frequencies and across the predetermined intervals.
 4. A system as recited in claim 1, wherein the measures of periodicity extracted from the open loop parameters include an open loop pitch gain.
 5. A system as recited in claim 1, wherein the measures of periodicity extracted from the open loop parameters include an open loop pitch variance.
 6. A system as recited in claim 1, wherein the measures of periodicity extracted from the open loop parameters include input signal relative power.
 7. A system as recited in claim 1, wherein the measures of periodicity extracted from the open loop parameters include a first reflection coefficient of the LP residual signal.
 8. A system as recited in claim 1, wherein the measures of periodicity are mapped using non-linear transformations to a normalized range, and wherein the overall voicing measure is computed as a weighted sum of the mapped measures of periodicity and a voicing measure of a previous interval.
 9. A system as recited in claim 8, wherein an overall voicing classification is derived based upon whether the overall voicing measure is within a predetermined range.
 10. A system as recited in claim 1, wherein an overall voicing classification is derived from the overall voicing measure. 